The two questions:
Have you ever worked for a government entity, either as a contractor
or employee?
Have you ever worked for a state or local government?
They may be looking for a potential conflict of interest. The government may forbid a employee who oversees purchasing, contracts, or contractors from quitting/retiring and working essentially in the same area.
For example if your job was managing the purchase of firefighting equipment for the county, the local government doesn't want you to get a job working for a fire truck maker. You would have incentive to award one last contract on the way out the door, or leave with information that can make your new employer win the next contract. Your friendships with your former co-workers might lead to them making sure your new company wins. If the rules won't let you work for them they want to know early in the process.
The new company might also have a non-poaching agreement with other companies and/or the government.