The keyhole in locks serves multiple functions:
Drainage
The hole next to the keyhole allows water to drain out, preventing rust or freezing inside the lock, especially important for outdoor locks exposed to the elements.
Lubrication
The hole provides access for lubricating the internal components of the lock, allowing it to function smoothly and preventing jams.
Conclusion
The little hole next to the keyhole in locks serves practical purposes related to drainage and maintenance, ensuring the lock remains functional and durable over time.