In Hilchos Tanis (Siman 571) the MB writes (SK 2 and Biur Halacha there) writes that for a T`Ch it is preferable to increase in learning rather than fast for sins. Alternative kaparos are suggested there, such as not finishing his meal or taanis dibbur. In fact, the Shulchon Aruch writes also, that employed teaching staff may not fast as this would be stealing.
I am puzzled by the fact that all these halachos (and important exemptions) are not mentioned in Siman 578, when the Shulchon Aruch states that anyone should fats privately on zaros which may have befallen in his or his familie`s life.All the MB (sk 1) adds is that this fast may be an absolute Chiyuv. What is the reason for this omission?
Here are a few thoughts regarding your question, which might be helpful.
- We often find that “divrei torah aniem b’makom achad…” that there are many time when certain points relevant point can be mentioned in different places and not everything is said in every place. It could very well be that it is mentioned in 578 because it will be discussed later.
- The Shulchan Aruch in siman 578 is discussing a person that is already fasting, ot if he should rather do something else.
- The Shulchan Aruch in 571 is talking about a talmid chacham or a person learning all day. Not everyone is doing that, and there are people that are holding by fasting etc. Additionally the M:B 571-4 does say that there are times when even a talmid chacham should fast, albeit not too much, and it should be supplemented with extra learning.