If you are installing a hot water heater or perhaps refilling it for some reason as the tank fills with water you should purge the tank of any air that is in it. This will prevent air getting into the water lines as badly as it might have the potential for.
Even so there may end up being a bit of air in the lines that will need to be purged after the process of filling the tank is completed. Always remember to have the water shut off until you are ready to actually fill the tank. Also keep the electric shut off until you are ready to use the tank and you have taken all safety precautions.