It all depends, really. Once you play for a while, you start to get the hang of it.
Nautilus and Amumu have generally high base damages to offset the lack of scaling they're going to have with their 0 AP items, generally. Amumu also has %Max HP damage on his W, which can end up being strong against other tanks. Yi and Xin scale well with Attack Speed mainly due to how their kits work; Both are on-hit reliant champions that have benefits for high attack speed. Yi has his double strike, and Xin has his heal.
Generally, once you've built your core item, you tend to look at what enemies you're against and what they're building. Say, for instance, I'm playing Vi jungle. If, during champ select, I see that they've got a team of mostly squishies, I'll pick Fervor and max E second. If they've got a team of tanks, I'll go Colossus and max W second, and build two damage items.
But yes, the more experience you have, the more you'll know how things "should" go.