When a Western government (or other state actor) decides to build something — public housing or satellites or a packet-switched network, for example — they don’t actually build it themselves. Governments don’t own construction companies and electronic design companies and research labs. The money goes to private actors who do the work.
So “divert” seems misleading. If the American government hadn’t “diverted” funds to build ARPANET half a century ago, we’d probably be stuck with the equivalents of AOL-style walled gardens instead of a single Internet because that’s the kind of network that private interests wanted to have.
... and this is called the "broken window fallacy".
You're right in that you remark that it's less bad than it initially seems. Some wealth is indeed recovered when the broken window is repaired. However everyone is by necessity worse off than if you didn't break the window in the first place.
So “divert” seems misleading. If the American government hadn’t “diverted” funds to build ARPANET half a century ago, we’d probably be stuck with the equivalents of AOL-style walled gardens instead of a single Internet because that’s the kind of network that private interests wanted to have.