Answer
Heat pumps and air conditioners have exactly opposite purposes and their efficiencies are defined differently.
Work Step by Step
For refrigerators, the COP is defined the way it is because the point of a refrigerator is removing heat from a low-temperature reservoir. An “efficient” refrigerator removes a lot of heat from the cold reservoir per joule of input work, hence $COP = \frac{Q_{L}}{W}$.
For heat pumps, the COP is defined the way it is because the point of a heat pump is delivering heat to a high-temperature reservoir. An “efficient” heat pump delivers a lot of heat to the hot reservoir per joule of input work, hence $COP = \frac{Q_{H}}{W}$.