Thank your friend for giving you some pure raw honey. You can of course get contamination in a mead, some sulfites added at the start will help ensure success. Your term foreign bacteria is a bit strange since the bacteria in the honey is normally there all the time, as in native bacteria

. There is bacteria in the hive and yeast to help ferment the pollen to make bee bread, hopefully some of that wonderful pollen makes its way into your honey.
Cooking honey is an age old method, what it basically does is drive off the aromatics and turn any honey into a generic tasting honey, we just did this on purpose to some Russian Olive honey that tastes very bad raw but when boiled the off taste vanished and we were left with a very generic tasting honey that is making a nice generic mead and some of which we then made into a tej and an anise mead as well as a ginger cooking mead. The cooking does denature the proteins and they precipitate out faster and so the mead clears pretty fast. If you got a nice honey dont cook it, if you got an off tasting one that you can get cheap then cook it and use it for meths etc.
WVMJ