A trailing dot in zonefiles has a specific meaning: it means, do not add the current zone as suffix; otherwise by default it does, which is useful so that you can just have
www in your zonefile and even use it for multiple domain names and see the domain name automatically appended.
This is the original purpose as described in section 3.1 of RFC 1034
and section 5.1 of RFC 1035.
The end dot is optional and could appear in any hostname you use. However many software are not prepared to receive it. Try on the web, take any URL, add a final dot to the hostname and see if you can access the website. It may also create problems with cookies.
It does not appear often in the wild as you say because for an human typing an hostname a trailing dot is just garbage. I doubt it would be required anywhere but a thorough response would maybe provide specific references.
However it is often used when you use
dig for example to specify what you talking about.
dig mx is ambiguous because
mx is both a ccTLD and a DNS resource record type. If you add a final dot it is more clear that you are querying for the ccTLD.
In the same way, if you have a search list configured in your OS (list of domain names to try adding as suffix to any name that has not "enough" dots), the behavior might be different for an application doing a name resolution of
something. (in the latter case the search list might not be used).