What is your concern if any?
Dont know about Mazda but some others use oem for after sale. Some of the European brands.
Rarely they use the ones that have in stock for the assembly line.
They do come from the same manufacturer but may differ a bit. Dealers sell 1) and 2) if not doing some shady practice on their own.
so :
1) assembly line parts
2) oem parts (same manufacturer, as good)
3) aftermarket (any manufacturer,variable)
4) bad/fake aftermarket, super cheap
The oem are certainly not aftetmarket china clones

but the manufacturer may have ...say factory in Japan and factory in another place.
Dealer sold parts are not aftermarket parts.
one exception probably to note-
Mazda North America though has a habit to have some oem maintenance parts (filters mainly) built in Mexico for cheaper price vs the oem ones they sell in the rest of the world.