how it is different to mine your own bitcoins rather than buying from market? Who decides and based upon what factors - how many coins you can mine?
If you join a mining pool then you split the 50 coins with everyone else in the pool (and they'll split with you) if you are the lucky machine than found the code.
The analogy is pretty direct: mining is the same as going and doing work to dig up gold, buying from the market is the same as buying gold in the market.