It’s no different than any country in the world.
That’s why every nation issues passports. To identify their own citizens. That’s why every nation issues visas. To identify who is there legally.
Every place I’ve ever been, requires you keep your passport / visa available just in case. Mostly I’ve relied upon photocopies due to the hassle of potentially losing your actual passport.
Visit Mexico more than 30 miles inside the border, or for more than a few days - and you’ll be expected to have documentation.
Same for any nation on Earth.
It’s mind-boggling America is unable to even agree on such a common sense thing as our national borders.
Mexico isn’t too persnickety about Mexicans having to carry passports. It’s visitors who need to worry.