Why can't we have mathematics devoid of these ambiguities? One reasons is that humans have small working memories, and novice mathematics students have even smaller ones. The ambiguity of notation, while confusing, once mastered, allows us to write shorter expressions, whose meaning we resolve from context, and which become both easier to write and to understand.
A second reason is that while mathematical logic is rigorous and precise, unequal mathematical objects are similar to each - even objects that on first glace seem nothing alike. For instance, the two types of inverses you mention, or sets and linear spaces, or groups and tetrahedrons. And because of the diffuse nature of mathematical objects, it is inevitable that the same notation will be used for unequal objects. Because, it advances our human understanding of mathematics to use the same notation for two unequal but similar objects.
This second reason, once understood, is one threshold between the mechanical mastery of the intermediate student and almost artistic use of mathematics by the advanced student.
As you say, the artistic use of cross-object synthesis and analogy definitely distinguishes the advanced students from the mechanical. Advanced students develop a sort of dialect that harmonizes the mathematical objects they encounter in a way that illuminates them all.
More than any of that, though, I think what you can see (even here in this thread!) is that, while we pretend that mathematics is a single cultural practice of rational humans communicating with other rational humans, it's really many smaller communities of mathematicians, all of varying skills trying to communicate with each other. My mathematical language as a teacher of 12-18 year olds is very different from my mathematical language when I did computational geometry for a living.
Because you have many communities of mathematicians producing new notation, you end up with dialects that all sort of meld together in the same way that reading Shakespeare is very different from reading Hemingway or Eco (in translation).
The closest programming analogue would be C++, where you have several mutually unintelligible dialects spoken by different communities of programmers with different concerns.
I think it's a lot less beautiful. I think it has to do more with historical accidents. We've stumbled our way forward in mathematics; there is no grand plan that unifies our notation. Just look at calculus for a prime example - df/dx and f'(x) come from two different lineages and get used interchangeably; the df/dx notation can be intensely misleading when students think that (for example) they should be able to use normal fraction rules.
Of course, there is no grand plan, and yes, a lot of notation is historical accidents. But my point is that attempting to "fix" it will probably yield a better notation, but not the "perfect" notation.
As an aside, df/dx treated a fraction is used as soon as second or third semester of uni when they learn how to solve differential equations using separation of variables, and physicists/chemists start using total derivatives for thermodynamics. I am not aware of notation different from df/dx where these subjects would be just as clear.
A second reason is that while mathematical logic is rigorous and precise, unequal mathematical objects are similar to each - even objects that on first glace seem nothing alike. For instance, the two types of inverses you mention, or sets and linear spaces, or groups and tetrahedrons. And because of the diffuse nature of mathematical objects, it is inevitable that the same notation will be used for unequal objects. Because, it advances our human understanding of mathematics to use the same notation for two unequal but similar objects.
This second reason, once understood, is one threshold between the mechanical mastery of the intermediate student and almost artistic use of mathematics by the advanced student.