What is the function of epiglottis?
You are right, The main function of the epiglottis is to seal off the windpipe during eating, so that food is not accidentally inhaled.(quote from here).

It's a flat shield of cartilage, which is obviously an efficient valve, It's a valve between the trachea and the esophagus. 

It lets lions to eat a pound of meat without choking on their prey. It lets humans drink tea without coughing on their buddies. 

Information stating that it's "possible" to eat without an epiglottis doesn't imply that it's "efficient and safe", and contradicts medical interventions where they use a piece of ear cartilage to build a new epiglottis. 

Survival didn't encourage the "possibility to eat"... it has made animals very robust and efficient at it. Herbivores can spend most of their day eating, and are often attacked while they are eating and drinking. Carnivores also have reasons for efficient swallowing, big carnivores can eat many pounds of meat very fast while fending off competition from hyenas and other predators. 

Sleep apnea patients have their epiglottis modified to give room to breathe at night, and they risk choking and aspiration for a while, although they can adapt because they keep some of the cartilage, so they still have a valve. 

Different animals have different breathing habits, with some being obligate nose breathers, including human babies of under 6 months and up to 6 years. That's because the epiglottis either contacts the trachea or it leaves space there.