A pilot might be risking his or her career to report a UFO as airlines and regulatory bodies frown on such things.
In the 1970s, when Close Encounters of the Third Kind was made, UFO encounters were considered to be the domain of kooks or attention seekers, two things that could attract negative publicity.
Airlines need customers to trust their crews, and any doubt could hurt business. It’s less true today as more and more inexplicable sightings have been documented, but it still can be a touchy subject for professionals.
As an example, in 1986 Japanese Airlines Captain Kenju Terauchi was grounded for several years after reporting an extended encounter with what he and his crew reported as “aircraft carrier sized crafts” while flying over Eastern Alaska. More details on Japan Airlines Flight 1628 can be found on Wikipedia.
Even though several radar stations, including a NORAD facility, confirmed the presence of something abnormal in the area of his plane, the controller at Anchorage saw nothing on his radar. Terauchi was lucky his career wasn’t ended for good.
While JAL was one of the more strictly run airlines in the business, but it’s likely any air carrier would have grounded him until certain he wasn’t a danger to others. JAL claimed they grounded him because Terauchi spoke to the press without permission.