So, single celled organisms dispose of all waste via the same function, by extracting it through the cell wall. Even today, birds excrete both urine and feces via the cloaca. Apparently even some primitive mammals excreted this way. So which creatures were the first to excrete these things seperately?
Also, a second [and less of a GQ] question, what’s the benefit of excreting urine and feces through seperate orifices? In other words, why did creatures who did, rise higher up the old evolutionary ladder than those who did not?
Demo it’s not quite as simple as your question suggests. First off it’s not just primitive mammals that had a cloaca, highly advanced modern mammals like the platypus also have a cloaca.
The reason I say it’s not simple is because the difference between a cloaca and a separate urethra and anus is largely cosmetic. The kidneys in these animals still excrete primarily nitrogenous waste just as in humans and the bowel still produces the faeces. The only difference is that in animals with a cloaca the ureter is voided into a common invagination along with the bowel. If I put a skirt on you, you would then effectively have a cloaca because the opening to the external world for the ureter and bowel would now be shared. As you can see the difference isn’t really very profound.
I’m not sure whether we know what the first creature was to have a separate anus and urethra opening to the external world however some bony fish excreting nitrogenous wastes separately via a bladder and urinary pores. IOW the urine was excreted independent of the cloaca. Not sure how far back that triat goes but it’s a safe bet that it predated the tetrapods.
Even flatworms have been excreting nitrogenous wastes via the skin separately to food wastes. As you can see the question kind of loses meaning when you get beyond the tetrapods.
There are two possible benefits I can see:
No intermingling of faeces and urinary tract so less risk of urinary infection.
Ability to utilise urine as a scent marker for own species without leaving faecal traces that will attract predators.
However I suspect that the condition exists in mammals for the simple reason that we produce large amounts of liquid waste from the kidneys whereas birds and reptiles produce solid nitrogenous and often excrete salt from glands other than the kidneys and so produce les liquid waste. Remember that most reptiles and birds lack a bladder, the nitrogenous waste is simply stored in the cloaca along with the faeces, and when that’s full the whole lot is voided at once. If mammals were to use the same trick we would be producing large amounts of watery faecal material many times every day.
That‘s not very convenient so instead most mammals have a well developed bladder to store the liquid waste that has no connection with the gut at all. That way we are also able to extract more water from the bowel and make the faeces less watery if desired.
And BTW demo, there is no evolutionary ladder. Gorillas aren’t more evolved than turkeys so you can’t say that animals with separate openings are higher up the evolutionary ladder.