The high pressure switch.
A safety that stops the compressor before something gives. When it trips, it is reporting, not failing.
A high pressure switch sits on the discharge side of the refrigerant circuit. When head pressure climbs past a set limit, it opens and cuts the control circuit, which stops the compressor.
It exists because the alternative to stopping is a ruptured line, a blown gasket, or a compressor destroying itself.
Why it trips in a Phoenix summer
Head pressure rises with outdoor temperature, because the condenser has to reject heat into hotter air. On a 112 degree afternoon a system with any condenser side problem gets close to the limit, and a system with a packed condenser coil goes past it.
The classic pattern is a system that is fine all morning and starts cutting out at three. That timing is diagnostic on its own, and the high pressure trip guide covers the full list of causes.
Auto reset and manual reset
Most residential switches reset themselves once pressure falls. That is why the system appears to recover on its own after ten or twenty minutes, which reads to a homeowner as an intermittent fault rather than a safety doing its job.
Some are manual reset, with a small button that has to be pressed. Those stay off until somebody attends, which is deliberate: the system is telling you to look rather than to wait.
It is a messenger
A high pressure switch that is tripping is almost never the thing that needs replacing. Something is causing the pressure, and the usual suspects are cheap: a dirty coil, a fan that is not running, or airflow blocked around the unit.
Bypassing one to keep a house cool removes the only thing preventing the expensive failure. It happens, and it is a poor trade.
When the switch itself fails
They do, usually open, giving a system that will not run with perfectly normal pressures. A gauge set on the unit settles it in a few minutes, which is why pressures get taken before anybody condemns a part.