They do it semi-voluntarily to prevent getting fined if they don’t. While government is far from perfect, I place no trust in agricultural corporations (independent farmers are a dying breed) whose only concern is profit. And as more and more of them merge, there is less competition and risk of losing customers.Not always true. Many companies test their products regularly and initiate recalls on their own. The Dept of Agriculture and/or FDA will get involved after the fact but they're not the ones who solely initiate recalls in the food industry. They do oversee the recalls however. Yes, there are some bad actors in the food industry but on the whole, most take food safety pretty seriously.
As far as the shutdown, I really don't know enough about it...