The original purpose of these holes in rims was to drain water from the rim, but they're now arguably more important as a release valve for air in the case of a sealing tape failure in tubeless tire setups. There have been *many* cases of rim sidewall failure when a breach in the tubeless tape led the air to escape into the rim cavity. Many/most rim walls are not designed to withstand this kind of pressure, and absent a way to vent the air they tend to fail rather spectacularly.
Tech writer/support on this here site. FIST school instructor and certified bike fitter. Formerly at Diamondback Bikes, LeMond Fitness, FSA, TiCycles, etc.
Coaching and bike fit -
http://source-e.net/ Cyclocross blog -
https://crosssports.net/ BJJ instruction -
https://ballardbjj.com/