Lots of funding by lottery back in the early days.
Yep and endowments by the richer citizens of the State. Franklin raised money to buy cannons and powder and shot and contributed a good chunk of change himself to help form the militia in and around Philly and the Ohio Frontier.