"A few things, it turns out. Bill-wiping is not the hottest topic in ornithology, but curiosity has drawn the occasional researcher to the behavior over the years. Although they haven’t arrived at a definite, universal explanation, we can summarize their reports on the role of bill-wiping this way: It definitely acts like a napkin, probably as a file, and maybe even as a cologne spritzer."
Things we humans may never know.
https://www.audubon.org/news/heres-why-birds-rub-their-beaks-stuff