When travelling abroad to a malaria zone, you need to start taking the malaria tablets before you enter to ensure you have sufficient medication in your system to give you protection against the malaria parasite. It is advisable to get them before you travel.
Additionally, medicines and pharmacies are heavily regulated in the UK. There is an audit trail of the manufacture, their storage conditions and their supply to ensure your safety. The medicines you buy abroad may not be as well controlled and you may purchase inferior quality medication that can be out of date, counterfeit or simply may not work.