Yes, they were or are made in Japan & Mexico...Then I've heard that the Hatchbacks were/are made in Mexico and the Sedans in Japan but, IDK!
In 2018(keep this year in mind), I was looking for a good used car for our daughter so, I was test driving everything that looked decent from private owners, dealers, rental sales. She had been driving a(made in Japan) 2006 Mazda3i/auto sedan w/~170,000 miles that she had been driving for 9 years.
In one instance, we went to one of our local HERTZ Rental Sales lots and tested two(same color & trim level) 2016 Mazda3i- Sport Sedans w/2.0L/Auto Trans. Both had 40Kish miles and a CarFaxReport with them. Both cars were listed for ~$11500.
As we were test driving these two cars on the same route, I noticed that one of them just felt that little better, a little bit tighter, spunkier and better put together. We drove them back-to-back and we both switched driving. We were gone for quite some time in both cars, getting in & out and looking around the vehicles, checking under the hood, sitting in the back seats, looking in the trunk & glove box and for missing things like a spare tire & jack, owner's manual etc.
During both drives, I asked my her to look at the CarFax to see if there was a final assembly plant listed, even though it probably stated so on one of the body tags. And sure enough, the car that came from Japan was the example that felt that little bit better, smoother, spunkier and just better put together.
What does all of this mean?--- In this case, NOTHING! They're rental cars with 40K miles on them. And it could have gone the other way around where the Mexican built Mazda3 felt better and there are too many variables to consider when looking at rental cars. Maybe if they were both brand new cars on the dealer lot, it could have/would have made a difference.
We chose neither and walked away and found a one owner 2015 Civic LX w/1.8L/CVT with 17700 miles on the odometer for ~12500($1000 more the the one year newer Mazda3) and clean CarFax/AutoCheck reports...in 2018(3 yrs.old). She drove this Civic for 3 years without incident and put on herself ~43000 miles(total 61K) until it got rear ended/totaled...that's another story!