Unless the miners themselves benefit from the work, there would still be an opportunity cost to them, no? If it happens to be useful to someone else that shouldn't matter, right?
That matter because it gives those who it is useful an advantage in attacking the blockchain
If it is useful enough that someone is willing to pay for it as a service, then it fundamentally changes the incentive model and voids the security it provides.