The horns are soft and fleshy so they’re likely a result of sexual selection. Same with the colorful bill.
“In summer (breeding) plumage, the outer keratinous layers of the bill — the rhamphotheca — grow in size and change to a bright yellow color at the base and dark orange at the tip. The size and color of the rhamphotheca helps to attract a mate. The brilliant outer layers of the rhamphotheca are shed in late summer. The face reverts to a gray and black color, with a smaller, less brilliantly colored bill, and the legs and feet fade to a pale fleshy color. This phase is referred to as eclipse plumage.”