How did anyone buy bitcoins before exchanges? How did the first bitcoins get bought by anyone?  

I understand how miners got them, but what did they do with them?
On messageboards like bitcointalk and chatrooms. People would use Paypal or other digital payment systems to send dollars. You could also trade in person through meetups and localbitcoins.com which still happens today.