What does wp_term_taxonomy.parent reference?

WordPress doesn’t use actual FOREIGN KEY constraints in MySQL. So, technically, wp_term_taxonomy.parent is merely an integer. However, what you’ve found is correct: it refers to a term in wp_terms by its term_id. But, as you’ve also noticed, the term_id and term_taxonomy_id should always be the same.

The reason they both exists is historical. Prior to WordPress 4.2, it was possible for taxonomy terms to belong to multiple taxonomies. So you could have a single term in wp_terms that corresponded to multiple rows in wp_term_taxonomies. WordPress 4.2 changed this so that terms can only belong to a single taxonomy. You can read some of the background on this change in this Make post from 2015.

These days you should only be using term_id to refer to terms programatically, and since a term’s parent is also a term, the parent value refers to another term by its term_id.

Ideally the parent property would just be in the wp_terms table, but the existing structure will likely remain in place for backwards compatibility reasons.