Happened to me many times. Sometimes they let me wear it over my (certified) N95, sometimes they don't.
Wouldn't that just be because of protocol, ie. they don't know if you, a member of the public, actually have a legit N95 mask, or if you know how to correctly implement it, etc.
Incidentally, if you want to validate 3M N95 masks, 3M has a web site for that.[1] You type in the code on the bottom of the box and 3M checks it. You can only do this once per code; the site will tell you if a valid code has been used before. They suggest signing and dating the box after doing this, to indicate that check has been done.
[1] https://www.3m.com/3M/en_US/worker-health-safety-us/3m-safeg...
They never required we remove a mask.
https://montreal.ctvnews.ca/outbreak-at-quebec-city-gym-link...
https://www.cdc.gov/mmwr/volumes/69/wr/mm6919e6.htm
https://elpais.com/especiales/coronavirus-covid-19/a-room-a-...
Maybe they coughed over shared food/drink trays.