Why there is difference between purchase price and sale price of foreign currency?

Because the person/institution handling the transaction wants to be compensated for his services.