why are the term_id and term_taxonomy_id doesn’t match on custom taxonomies, but are duplicates on categories
term_id is a unique ID for the term. term_taxonomy_id is a unique ID for the term+taxonomy pair. A taxonomy consists of sometimes many terms, so basically the term_taxonomy_id links the term_id to the taxonomy. All info on these can be found here: http://codex.wordpress.org/WordPress_Taxonomy