Ant came first, then when Microsoft redid the VS project format, they created MSBuild.
As incredible as it may sound, Ant is still easier to deal with than MSBuild.
If you understood the paradigm, you could write branches in Ant files simply using properties and guards on properties ("unless"). Using IF in Ant was basically admission of not having understood Ant.
This said, I used Ant for a very limited amount of time.
https://ant.apache.org/manual/Tasks/condition.html
The else part is easily done by repeating and negating the condition.
Two other advantages of Ant that MSBuild lacks in a sane way to this day, are macros, and proper documentation.
I always liked Ant, as I don't suffer from XML allergy.
Also you forgot MSBuild is used for everything, not only .NET.
Never seen any big corp using alternative .NET build tools, rather wrestling MSBuild, or before it came to be, nmake.