Why are pilots told not to drink alcoholic drinks even after landing, even when their next flight is more than 24 hours later?
Is this some kind of precautionary rule?
Commercial pilots (in the United States) are usually not allowed to drink while on duty regardless of their flight status because, among other things, it would be frightening to any prospective passengers who might see them drinking. For example, American Airlines strictly forbids consuming alcohol or any intoxicant publicly while in uniform. Here is the exact text of their company policy:
Unauthorized possession or using any intoxicants on Company premises at any time, or drinking intoxicants in public while wearing a uniform with Company emblem or insignia is prohibited.
Note that this does not disallow drinking as long as it is (1) not on company premises, and (2) is in private. Obviously, if the person is a US crewmember then they must adhere to FAA rules in addition to company rules (see FAR Section 91.17 for details on those rules).
Pilots absolutely can drink after a flight once off duty, just not in uniform. Every company I'm aware of prohibits alcohol consumption in uniform while in view of the public. This prohibition is about maintaining an image and to not associate drunk pilots with the airline. The regulations have no verbiage about uniforms but stipulate no one on-duty may consume alcohol.
The rules for air carrier pilots is laid out in 14 CFR 120.37 (excerpt):
(b) Alcohol concentration. No covered employee shall report for duty or remain on duty requiring the performance of safety-sensitive functions while having an alcohol concentration of 0.04 or greater. No certificate holder having actual knowledge that an employee has an alcohol concentration of 0.04 or greater shall permit the employee to perform or continue to perform safety-sensitive functions.
(c) On-duty use. No covered employee shall use alcohol while performing safety-sensitive functions. No certificate holder having actual knowledge that a covered employee is using alcohol while performing safety-sensitive functions shall permit the employee to perform or continue to perform safety-sensitive functions.
(d) Pre-duty use. (1) No covered employee shall perform flight crewmember or flight attendant duties within 8 hours after using alcohol. No certificate holder having actual knowledge that such an employee has used alcohol within 8 hours shall permit the employee to perform or continue to perform the specified duties.
The rule here is 8 hours "bottle to throttle" and at the end of those 8 hours for BAC must be less than 0.04.
14 CFR part 121 Appendix J further stipulates that pilots may not perform "safety sensitive" functions until BAC is below 0.02. Additionally, many company operating manuals (FAA approved) require 12 hours between alcohol consumption and the beginning of a duty period.
For most pilots, the rule is 12 hours "bottle to throttle" and BAC < 0.02. This means a pilot, once off-duty and out of uniform, can enjoy a drink as long as the overnight is longer than 12 hours.