Smoking became illegal on domestic flights over six hours in duration in February 1990 and later on flights between the United States and foreign destinations. Today, virtually every commercial flight in the world is smoke-free.
Even though 'No Smoking' signs appear throughout the cabin and lavatory, there is an ashtray-- on both old and new planes-- in the lavatory.
Turns out federal law requires ashtrays in lavatories just in case someone lights up. Officials figure it's better to put the butt in the ashtray than in the trash where it could catch fire and KA-BOOM.
Regardless of whether smoking is allowed in any other part of the airplane, lavatories must have self-contained, removable ashtrays located conspicuously on or near the entry side of each lavatory door, except that one ashtray may serve more than one lavatory door if the ashtray can be seen readily from the cabin side of each lavatory served.