Warranties aren't really enforced by Mazda, id say the dealerships are the ones doing the enforcing, while Mazda created the warranty period etc. With that said the whole purpose of warranties if to offer free repairs for the first xxx miles or xxx years of a car for anything that can be considered a poor design that leads to failure or a faulty product (one that is not expected to wear and tear such as brakes etc).
What this means is that unless the owner has done something to directly (or sometimes indirectly) cause a certain part to fail, they have to cover the appropriate repairs.
Say your engine blows up. Unless the dealership can prove that it blew up due to negligence by the owner and it was not a faulty design, they have to cover your new engine.
Now taking a car to the same dealership for basic maintenance is not really a bad idea. Some dealerships have been known to do warranty work even past the warranty period for loyal customers, while i'm not saying every dealership has cool enough people, there are ones like that out there if you look.
For example I have gone to a dealership where the service writer said that even if the car was modified and known to be modified, simply remove the mods and they will take care of you.
Usually when people do self maintenance they keep oil/ oil filter receipts which are obviously date stamped and that usually suffices. Some dealerships don't care tho.