Toyota and Honda long term reliability and thus resale value has been higher. Mazda had good designs for their target market but the material quality is closer to that of domestics.
Mazda has that zoom zoom marketing while young adults into that along with the firmer ride are as likely to buy used and many today don't even want a car, let alone to turn a wrench on one. Some young adults are impulsive and that gets Mazda the market share they have, but the rest realize what a significant investment a vehicle is, possibly the biggest ever made if they don't own a home yet, so zoom zoom vs reliability is not a hard choice.
Less young adults are more likely to want a more comfortable ride for their primary vehicle and their 2nd/3rd vehicle used for joyrides won't have as much mileage put on it. This is how Mazda made a market win with the Miata, offering this niche product that doesn't have to hold up as long as Toyotas or Hondas, just last for an automotive lifetime of weekend joyrides.
Now I'll grant that part of the issue there is that people who drive a sedan like it's a sports car are going to rag it out. Perceived reliability might be higher if not for that, but rust is rust, and they just don't have the budget to R&D for much besides their new engines, and the fuel economy benefits of that are not high on the list of priorities for young adults wanting a zoom zoom car.
Consumer Reports? Meh they are a mixed bag, often their findings don't seem to align with my experiences but I can accept (and expect) that Mazda's competitors are suffering in reliability in recent years due to their newer designs trying to eek out more fuel economy. The curious thing is that the demographic more likely to engage in CR magazine and surveys is the opposite of the Mazda target market, so the only way they could have a comparable sample size is if Mazda's marketing department is gaming the CR survey system.