In theory it’s for safety, both for the patient and the workers. A lot of the point of inpatient facilities is to monitor the people, and ensure they can’t harm themselves or others, while their circumstances or medications get sorted out.
That’s not to say every facility is perfect, and that’s not saying anything about you. But generally, it’s for their own good.
For what it’s worth, military aid of this sort doesn’t involve any money leaving the US. This is the government paying companies to send war materials to Ukraine, or sending and writing off our own old military equipment. You can take issue with the money going to the military industrial complex, but it’s not going overseas at the expense of our own citizens.
Also, funding Ukraine’s defense is vastly immensely cheaper than fighting any conflicts of our own, and has similar geopolitical outcomes.