Thats not what happened. It more like you go to the restaurant and order a meal. The restaurant owner was borrowing against his days resceipts so as to leverage that money in a stock flip and earn 400 percent return. The Stock market crashes and he is now in the hole for 3,000.000 dollars. The waiter comes to you with the bill and a premium of 920000 dollars has been tacked in so as to help pay for his losses so he can stay in business.
You refuse to pay for your meal and are threatened with arrest.
8 percent of the money "loaned" by the IMF was spent bu the Greek Government on services. The rest went to bail out the banking system The banks were both Greek banks and foreign owned banks. These banks had invested in the get rich schemes that were being sold bythe fraudsters from Goldman Sachs and the US based banking systems.
Since Greece can not print money as a member of the Eurozone (like the US did to bailout its banks to the tunes of trillions) it had to borrow from the IMF and ECB.