History of invention in the science of mathematics would show that there is nothing that's useless in the long term. It's all pieces of a puzzle.
New mathematical concepts are usually published in scholarly journals so it's possible to dig them up decades later when they're needed. But most companies never publish stuff that doesn't work, and don't even make any effort to learn from it internally. So they make the same mistakes over and over again.
Nah, most remain useless.
Inventions that were initially useless but found application later, are still in the very small minority.
I agree with you in principle, but in my mind there's a slight disconnect between a proof of a theorem that can freely be built upon by the mathematical community and the social media integration no one asked for that a 5 person point-of-sale startup writes months before going bankrupt.