Globally, it is pretty typical. Not just Mexico and the U.S., but France, Germany, Netherlands, Iceland, Canada, Brazil, India, Israel. [1]
[1] https://ballotpedia.org/Voter_identification_laws_by_state
[2] https://en.wikipedia.org/wiki/Voter_Identification_laws