1 Answer
1

The Be'er HaGolah there (#36) cites the source of this ruling as the Mishna on Yevamot 22a. The commentaries (eg Kesef Mishnah) to the Rambam's citation of this law (Mamrim 6:11) make this point as well.

The Mishna there says any son a man has, even a Mamzer (see how the Gemara derives this on the next page), counts as a son for laws like Chalitza/Yibbum, cursing, hitting etc. unless that son is from a non-Jewess.

So it seems the Shulchan Aruch and Rambam are just following the Mishna in this regard. As for why the Mishna had to say it, see the Gemara there which asks why the Mishna had to specify that a Mamzer counts as a brother for purposes of Yibbum. It answers that you might have thought the obligations only apply to Kosher relatives not Pasul ones. Perhaps a similar logic applies in the second case of the Mamzer son.

That is actually disappointing (to me). I was hoping the logic was something like, since the father sinned in conceiving him, the law of honoring him wouldn't apply. Even though it might have been a Havah Amina, that would have resonated with me a bit better than "he's Pasul so he doesn't count".
–
Seth JJan 7 '13 at 21:17

@SethJ Sorry :) The gemara doesn't deal explicitly with the hava amina for the case of mamzer son, only mamzer brother. You can check rishonim there who might suggest other ideas for mamzer son.
–
Double AA♦Jan 7 '13 at 21:22