I was a Bear Biologist for 10 years. Keep your campsite clean and all attractants (food, garbage, toothpaste, deodorant, chapstick, etc) locked up and secured from dusk till dawn. As long as the windows are completely up and the doors locked, then your vehicle can effectively serve as the “lockbox” for securing attractants. Leave a window cracked or a door unlocked and a bear will get in and destroy the interior (they particularly like eating the foam inside seats).
You never know what experiences a bear has had prior to your arrival at a given campsite. The previous occupants could have fed it, or they didn’t secure attractants and the bear got a treat. They are very acutely aware of associations - one human feeds them and they expect all humans to feed them. And there have been multiple bear attacks in the Tonto NF, as well as multiple fatal attacks in Arizona in general, over the last 10 years.