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.
Inventions that were initially useless but found application later, are still in the very small minority.