Each player affects the market and all other players will see stock prices rise and fall accordingly. If players had access to unlimited cash, it would make this feature meaningless. However, we have an excellent resource to help you earn millions of $GTA from the stock market regardless.
Players who use cheats to add large sums of money would be able to affect stock prices for non-cheating players as well, and Rockstar can't have that. It would skew the balance and negatively impact the game experience of players who don't want to resort to using cheats. However, the stock market is also the solution to the money problems you might have in story mode. If you play your cards right, all three protagonists will be walking around with millions.
Basically, you need to leave Lester's assassination missions until the very end of your playthrough, giving you the largest sum of GTA$ to be invested in stocks and in turn producing the largest payout. In single player there are GTA 5 cheats for pretty much everything, from making yourself invincible to maxing out your health and armour, but there isn't one that'll give you an infinite bank balance.