Why is the tail group of virtually every airplane swept instead of straight?
There is more to it than just looks.

One immediate benefit is a more backward location of the center of pressure on the backwards swept surface. But that effect is small and has to be bought with a lower lift curve slope, i.e. lower effectivity at low angles of attack rsp. sideslip.

But once sweep is big enough, it will extend the useable range of sideslip angles at which the tail is effective. Sweep reduces the lift curve slope but extends its linear range to higher angles, so the maximum lift per area of a swept surface is about as high as that of an unswept surface. This is especially true for low aspect ratio wings where the outward movement of the boundary layer is not a big factor. Therefore, the aerodynamics of a vertical tail suffer much less from the usual sweep effects we know from swept wings.

Adding a fillet ahead of the root of the vertical tail increases this effect further and has been instrumental in making designs like the Boeing 307 spin proof. Before that change the Boeing 307 prototype suffered separated flow on the vertical in a spin and crashed when the aircraft oversped in an attempt by the pilot to end the spin by applying differential thrust.

While the wing operates in a narrow range of angle of attacks and straightens the airflow for the tail, so the horizontal tail is able to work within an even narrower range, the fuselage creates an unstable yawing moment over a much larger range of angles of sideslip. In order to have enough directional stability even at high angles of sideslip, a swept vertical tail is very helpful. Yes, this swept tail needs to be larger than an equivalent vertical tail which is designed for single-digit angles of sideslip, but this straight tail will render the aircraft unstable once it ventures into higher sideslip angles.

Reference: NLR Report A-1582. Sorry, I found no online source. It is discussed in Ed Obert's "Aerodynamic design of Transport Aircraft" on page 418.

Horizontal tails do not need the extended working range - here, it is enough to add stabilizer trim in order to adjust tail lift for different wing flap settings. Besides, building a horizontal tail with a swept hinge line is much more complicated than building a straight hinge line, so most horizontal surfaces have just a little sweep such that taper and sweep together result in a straight hinge line.

But there is one exception: In the early 70s many glider designs used a full-flying, swept horizontal tail, like this Standard Cirrus below (picture source):



This is obviously not for compressibility. By sweeping the tail its center of gravity can be moved close to its center of pressure, so this tail needs no mass balance and has low actuation forces. The downside is the rigid, symmetrical airfoil: At low speed and higher angle of attack it has very little effectivity because the flow stays separated while a conventional tail with a fixed stabilizer will already show attached flow. This led to a number of fatal crashes in winch launches when the aircraft would pitch up into a stall and could not be controlled.