Earning anything, they are mistaken. Agree with you that it is generally better to leave it alone and there are some cases where it does make sense. I just advised someone of that very example this week.
Still, most 401K loans get squandered and the biggest reason not to do one is if you quit, you are in a world of hurt, not because you are earning, in this case, a guaranteed 9.5% on the loan, but because of the taxable income and penalty if you quit while the loan is outstanding. Most of the time it is better to leave it in your investment account, but not because the opportunity cost is zero versos the (potential) market return