Why do some airplanes have simultaneously a straight wing and a swept horizontal stabilizer?
The tail sweep helps to extend its range of angles of attack.

For both stability and control, it is very important that the tail doesn't stall before the wing in any circumstances (for a classic design; for canards it may be beneficial). Generally, for high positive angles of attack, the horizontal tail already has an edge because it is set at a lower angle of incidence for statically stable airplanes. Plus, the change of downwash with AoA helps.

Still, to delay stall further, particularly when control surfaces deflection is considered, a higher sweep angle can be used. The lift slope vs AoA decreases with the [cosine of] sweep angle, and the stall angle increases. Note that the maximum lift coefficient also decreases, so the tail may need to be sized larger.

You might notice that even for the airplanes with swept wings, the sweep angle of the tail is nearly always higher (typically by 5°), primarily for this reason.

The leverage advantage (mentioned by John K), may be important in practice only for naturally short-tail airplanes, typically with rear-mounted engines. A classic solution is to put the horizontal tail on top of a swept vertical tail. But in other circumstances the additional lever arm of a higher sweep will likely be offset by the lower effect per AoA and thus larger size (as mentioned above), and heavier design due to additional torsional loads.

And let's not forget looks! It's fashionable to have at least the vertical tail sweep. Compare different versions of C175, for example.