A bacterial smear must be heat fixed in preparation for allowing it to be viewed safely through a microscope.
The heat fixing enables the bacteria to stick to the microscope slide more easily. It kills the organisms present in the bacterial smear without making them difficult to see under the microscope clearly. Essentially it allows the bacteria to keep it's correct form to allow the smear to be studied effectively.
How to prepare and heat fix a bacterial smear
The video below shows the process behind preparing a bacterial smear and how to heat fix the microorganisms. Worth a look if science is your thing!
It's necessary to heat fix the bacterial smear as it stops the bacteria present on the slide from spreading. This is important depending on what the type of bacteria is as it could be potentially dangerous to humans through the spread of disease.