While he may have lost $50 on the project itself it doesn't mean it didn't add $50 or more in value. It didn't add value to the house. Let's say he built a little bar and entertaining area in his backyard. If he has guests over twice a month and makes it BYOB and that keeps him from going to the bar twice a month for entertainment he will quickly recoup the $50, possibly the first time he has people over.
Something also does not have to provide monetary value to have value to the person. A lot of things people buy add no value. Just about anything you buy new loses value as soon as you take it out of the box. No one needs a 42" TV. Everyone could get by with a 21" TV or no TV at all. All we need to survive is food, clothing, and shelter. Everything else we have is a luxury. Jim obviously felt that whatever he was building was worth at least $150 plus his labor to build it so to him it has value.
Frank will use that $50 leftover after paying for the lumber from the supplier to pay his business expenses such as rent, utilities, payroll, taxes, and his own paycheck.
I don't see capitalism as the problem. I see huge corporations (auto manufacturers, banks, etc) that don't have to deal with the consequences of their poor actions as a problem. I also see the lack of self-control over spending as a problem. I don't mean just the government and the banks, but also most of our citizens. Most everyone lives in massive debt and buys many things they cannot afford due to the easy availability of credit.