These are not fungible. Basic research, within the basic research budget, is. It's much easier to argue for $17bn being deliberated for the FCC (that's not going to happen, let's be real about European politics) to be re-allocated to the sciences than it is to shift Panzer production.
(As a rule of thumb, arguing for an expense relative to a military budget--the o.g. of state expenses--is a weak argument. And especially in Europe, where the American military is no longer a theoretical backstop, it's politically tonedeaf.)
> there's no shortage of money
There is always a shortage of money. Because human desires are infinite and our resources are not.
> lawmakers don't fear that putting too little money towards science will lose them an election
Do you really think the solution to flagging public support for the sciences is more synchrotrons? Where best case we discover a new particle, but probably not?
Science isn't a faith. There is value in exploring things we don't know. But that doesn't give every exploration mission infinite inherent value.