Some abilities are situationally way more useful in your matchup. Malphite can max any one of his three abilities depending on who he's laning against. If it's an auto attacker, maxing E deals a lot of damage and cripples their attack speed. If it's a ranged matchup, you aren't going to land your E so maxing Q for poke (vs Heimer and Jayce for example) is much better. If it's against an AD caster like Riven where she can shield your Q (which costs too much mana to waste maxing) and won't lose much damage with an AA slow, getting that bonus armor and AA damage modifier maxed first is a better choice.
It's all about either matchup efficiency or ability scaling.
Some champions have abilities that just don't scale nearly as well as others, like Darius. His W only lowers its cooldown with levels (which can sometimes be better than Q against mobile champs), while E lowers the cooldown and increases the armor pen, which isn't as efficient early game before people get armor. His Q can start clearing caster minions when it's rank 5 with just a little bonus AD and hits like a truck against squishy champs, so it's generally a better max.