A few years ago I read a comment on HK which addressed that very point. The argument said that if PoW was useful, the security could be compromised unpredictably.
It goes something like this: Imagine that you are mining Bitcoin and protein folding for a drug. Let's also imagine that if your mining rig finds the protein, it's worth $15m (as a company could commercialise a new drug with that information).
You can imagine a point where you can make more money from the results than from the mining (if they are useful, they will be worth some money after all). But the security of the Bitcoin network lies precisely in the game-theoretical aspect that it's more profitable to mine than it is to cheat. But if you can mine and make some money on the side (because it's useful), then cheating [double spending] might become more interesting. Or perhaps your "side-business" can bootstrap a 51% attack.
Finding a useful & relevant computational problem, whose monetary value is predictably low far into future and whose computation scales with a simple function ... well, it's a really difficult question. So the safest option is to go for "brainless" computation. That is trying random numbers.
I think it is not useless. It does the job: "Keeping the network secure by calculating random hashes". Useless, of course, is very subjective. I wish most video games did something useful like protein folding (I consider them and the machines powering them a waste of energy, matter, mining, time and intellectual power).