It's more a surprise that some rulesets map to physical world as well as they do [1].
For some there may be very important ones in the future like e.g. number theory got in cryptography. But for example just knowing whether P=?NP or if the Riemann hypothesis is true probably has no "physical reality" direct applications.
[1] https://en.m.wikipedia.org/wiki/The_Unreasonable_Effectivene...
The motivation of most non-applied mathematicians is aesthetic, much like the motivation of someone in the arts. It's done for its own sake ("mathematical beauty"), not because it has any practical application.
Mathematics might turn out to be "useful" more often than the average novel - but that doesn't mean the math was done with any use in mind. For example many developments in differential geometry made in the 19th century were inapplicable to anything physical for decades until Einstein applied them to create general relativity. Plenty of math becomes useful long after its development, and plenty more never finds any practical application.
But (integer) numbers and their behavior had huge significance in the ancient worldview, and still do even in our days if you look deep enough. And the Pythagoreans et al applied number theory in e.g. music.