You're right, but the difference is perspective. In those situations, the "employers" expect the work to be free, because they are "paying" you in non-monetary ways (such as, continued or closer friendship). So someone offering to do work for free is meeting their expectations.
In the case of a stranger approaching a company...An employer is expecting such work to cost money...and if someone unknown offers to do that work for free...then there are multiple ways to interpret that offer, many of them detrimental to the candidate:
1) The candidate is actually not very good or is inexperienced, or else he would know that he could be getting paid good money to do what he is offering to do.
2) The candidate sees the proposed work as trivial. See 1)
3) The candidate is desperate, leading the employer to wonder if either #1 or #2 have something to do with that.
4) The candidate sees the employer as desperate.
5) The candidate is actually very good and is fully confident that his work will knock the employers' socks off.
Sure, #5 is possible. But likely?...