It's also possible Bob's thesis on SpaceX could have been wrong and the shares could skyrocket. There's usually a provision in the contract for Alice to recall the shares she lent to Bob. In this case, Bob would be forced to buy SpaceX stock at the current market value and likely lose money on the overall trade.
To answer your specific question, "Who do you make money from?" It's actually not clear. Bob selling-high and buying-low doesn't necessarily mean whom Bob sells-to and whom he buys-from are on losing sides of the trade despite Bob making a profit. E.g. the buyer of Bob's short-sell could write calls and the stock could close pass the strike on expiration and turn a small profit as well.