Tech leadership is simply based on number of researched techs, not which civs have researched the most sophisticated techs. Human players are much more inclined than the AI to beeline key techs (like Education) -- the most notable exceptions are when the AI is beelining a tech that unlocks a unique unit or building.
By checking trade route yields, you (or the AI) can determine how many techs a potential trading partner has researched that you (or it) haven't researched, which is one way to help decide where to send your spies. There are, of course, other ways of determining which techs the other civ might have researched (e.g., if they built Forbidden Palace, they have Banking, which means they have Education and Chivalry; if they have caravels, they have Astronomy, which means they have Education, etc.).