This is the reverse of the old chemistry convention but is standard in most engineering texts (e.g., Cengel, Moran/Shapiro). When you burn fuel in a boiler, heat flows into the water/steam system, so $Q > 0$. When a condenser rejects heat to a cooling tower, $Q < 0$.
A classic illustration: adiabatic compression of a gas (no heat transfer) raises its temperature solely by work input; conversely, heating a gas at constant volume raises its pressure without doing boundary work. Both add energy, but the consequences for entropy and efficiency differ profoundly. engineering thermodynamics work and heat transfer
), combining internal energy and the flow work needed to push fluid across the boundary. This is the reverse of the old chemistry