Since a lot of padlocks are used outdoors the purpose of the little holes on the bottom of padlocks are their to facilitate drainage of any water that may get into the padlock when it rains or snows etc.
The holes allow the water to drain out of the padlock so it doesn't freeze and expand which could break the lock and freeze it shut or rust it out inside.
The holes on padlocks can also be used to squirt some WD40 or other lubricant including oil into the padlock to keep it from rusting and make it work for smoothly.