Simple: One takes more shields than the other, and you might want the cheaper one. This is useful in Monarchy, for instance. On your borders you might want strong phalanxes to defend against attack, while deep in your civ, where there are few threats, you only need troops for martial law. In this case, you want to build warriors because you need three per city for unhappiness, and it's a waste of shields to build a bunch of phalanxes or archers when you don't need the good defense. Warriors are also very useful because you can build Leo's and a crapload of warriors, and then study Gunpowder. Then you've got a whole lot of Musketeers that only cost you ten shields each. I've said these things in another thread or two, and the point is, warriors are great units.
Same thing with marines (I've never built a single marine in my life): they take more shields. It's also a matter of what their abilities are. Riflemen defend cities, and marines attack. Would you tell the U.S. Army never to build any army divisions merely because amphibious and harder-charging marine divisions can be built? There's no need for that "8" when you're defending cities with them, so why waste ten shields on them? I just have veteran riflemen and/or fanatics to hold my cities, and then tanks, howitzers, etc. to destroy my enemies far from my cities.
Also, chariots can be useful when they're early early early game goody-hut NON units, and in king I always win before 1 A.D. using that strategy, even if they're only horsemen. That's king though; in deity that strategy can only kill one civ or two.