There is a huge amount of mathematics that initially seems as though it could not possibly have any practical application that later turns out central to all sorts of things in the real world.
The most obvious examples are number theory and group theory, which are respectively the study of numbers and how they behave under basic operations like arithmetic, and the study of a type of set with a single operation that satisfies very basic rules[1]. How could this possibly have any relevance or practical application? And yet it turns out they are central to cryptography and information theory. Joseph Fourier trying to solve the equations that govern how heat diffuses through a metal came up with the theory that forms the basis for how we do video and audio compression (and a ton of other things).
Finally mathematicians don’t speculate about how many dimensions the universe has, they study 4- and higher- dimensional objects and spaces to understand them. This theory is used all over the place. You can’t have a function like a temperature map without 4 dimensions (3 for the spatial coordinates of your input and one for the output).
[1] this turns out (non-obviously) to be the study of symmetry.