If we follow Pareto principle, then it doesn't make sense to optimize spendings that are close to zero if compared with something like military spendings.
https://en.wikipedia.org/wiki/Pareto_principle
Even if string theory is just pure math with no base in reality, it still can be useful (any math domain for that matter).