Most people do so as a pious devotion, and it is not in any way incorrect to do so, but there is also no requirement to do so. Holy water is a sacramental of which you are free to avail yourself, but you are not required to use it when you enter or leave a church.