Math studies structures - you invent some axioms, operations, rules, and whatnot and then discover the consequences of your invented definitions. Zero is a natural number, every natural number has a successor, addition works in such and such way by repeatedly invoking the successor function, multiplication works by repeated addition and now let's see what we got. Look, we can represent every natural number as a unique product of some special numbers, let's call them the primes. So it's invention and discovery on this front.
On the other hand the universe does not do whatever it likes, its bits and pieces show structure and regularities that we can discover by observing the universe. And now we invent mathematical structures that show the same patterns as we observed in the universe and if we have chosen the right mathematical structure, then discoveries in the mathematical structure will correspond the things in the universe and we should find them when we look. If not, we did not pick the correct mathematical model.
So as long as we are talking about mathematics that models parts of the universe, we should not be surprised to find it in animals or aliens as it helps to make sense of the universe and survive in it. When it comes to mathematics that we purely invented for the fun of it and that bears no relationship to the universe, I wouldn't be surprised if everyone in the universe comes up with totally different ideas of what things are interesting to investigate. Then on the other hand everything in the universe is subject to the laws of nature and maybe this prevents everyone from straying too far from the mathematics that models the universe.
And I think this also applies to logic - either P or not P is true is not some fundamental truth, it is one rule you can invent to build a logic. And it turns out that this logic matches the way the universe works at macroscopic scales very well, but go down into the realm of quantum mechanics and suddenly P and not P might be true at the same time. Or even be a meaningless statement to begin with.
There is also probably another complication, as you can model structures with other structures it is probably not that easy or even possible to say that this or that thing in the universe matches this or that mathematical structures because you could pick a different one and model the former one in it. Just because we can build all of mathematics on top of set theory it is probably not too useful to say that the universe is sets all the way down.