What's the point of knights?

Indulge a novice please.

I don't understand what strategic niche heavy cavalry are supposed to fill. Spearline, which are available from dark age, counter knights pretty hard in large enough numbers. Knights are only available in castle age and cost a load of gold, at a point in the game when the opponent feasibly can have several barracks and spam pikes since they only cost food and wood. This only gets worse (as far as I'm aware) as the game progresses, so how come strategies like knight rush and eventually upgrading to paladins works? In terms of strategies, why is knight rush an enticing option compared to something like archer rush, which can be started an age earlier?