Once upon a time, when people smoked everywhere, you could smoke on airline flights. The back of the plane was designated as a smoking section, but then so was the First Class section in the front. And everyone breathed the same recirculated air anyway. Smoking on planes was phased out by the end of the 20th century, but planes still have ashtrays. Yes, they do. They're found in the bathroom doors. And it's not just because the planes are old -ashtrays are required in planes.
According to the Federal Aviation Administration's (FAA) list of “minimum equipment” for aircraft, an ashtray in the plane toilet is still a legal requirement.
Yes, despite nobody smoking on a plane, bar a few belligerent celebrities and louts, the FAA says that lavatory doors must still be fitted with ashtrays because if someone were to have, illegally, a cheeky fag, they still need to stub it out, and it's best they have somewhere to do that rather than cause a fire by dropping it in the bin.