First, shares are a form of raising capital. A company must have some capital, and Bob receives the shares in exchange. So it is not free (the exact minimum would depend of the requirements for incorporating).
In both cases, Bob is not only a shareholder but the manager of
Bob Limited. Bob will not incur liabilities for being a shareholder, but he can be at fault for his actions as a manager (for example, if he gives false financial data about
Bob Limited in order to get credit for investing). Do not confuse
Bob the Managerand
Bob the Shareholder, as they are different roles.
Of course, if you are a trading company and Bob the Manager approachs you asking for credit for
Bob Limited, you will have to consider which assets
Bob Limited has to cover possible debts, and you will ask him the books or other proof. If Bob the Manager provides you the correct information about
Bob Limited and does nothing "funny"1, Bob the Manager is off the hook; you did provide credit hoping to get profits but you knew that there was a risk, and you were given the data needed to evaluate that risk.
If Bob the Manager did things the wrong way (he did "cook" the books, he did provide false data or he did appropiate
Bob Limited money) then Bob the Manager will probably be prosecuted. But Bob the Shareholder will not be liable for this, he will only lose the assets he did put forward as capital as the
Bob Limited value will drop to zero.
B) does not change much the situation, Matt still only loses his part of the company2. The difference here is that if Bob the Manager did "funny" things and did not manage the company correctly then Matt may sue Bob the Manager, too.
For example, using the assets borrowed to buy a nice mansion and then selling it to Bob the Shareholder (or to Bob the Manager) for $1.
2Which is not valued at $50 but as half the net worth of the company. Of course, if the company was valued at $100.000.000 and Bob the Shareholder sold half of its shares for $50, people from the tax office are likely to come asking lots of questions.