Hiring a Chazzan to “Work” on Shabbat

Is it permissible to hire a chazzan to “work” on Shabbat?

In OC 306:5, the Shulchan Aruch writes, “It is forbidden to hire a chazzan to lead the prayers on Shabbat.”

That’s a very straightforward ruling!

On the other hand, in OC 585:5, he writes, “One who takes a salary for blowing the shofar or leading the services…will never see blessing from such money.”

This seems to imply that taking money for leading the services is not truly forbidden, though it is unbecoming.

How do we reconcile this contradiction?

The Magen Avraham, OC 585:12, asserts that indeed, it is not truly forbidden to take money for leading the services on Shabbat because, ultimately, the work being performed is a mitzva. There is also a view that the Shulchan Aruch truly holds that it is permissible to take money for leading services, although from the perspective of “middat chassidut” one should not do so. The Taz, OC 585:7, says similarly and adds a related contradiction in the Shulchan Aruch regarding the permissibility of selling a Torah scroll.