TPMS works by calculating the RPM of the wheel and knowing the tire size and vehicle speed. Most TPMS setups don't know the actual pressure, they infer it.
For 2017 the Mazda6 used an indirect system: https://www.mazdausa.com/static/manuals/2017/mazda6/contents...
For 2020 it's a direct system with in-tire sensors: https://www.mazdausa.com/static/manuals/2020/mazda6/contents...