Why do I need to set a hostname?
Solution 1:
Certain applications will use the hostname for certain parameters unless explicitly set. Postfix, for example, will identify itself using the hostname of the machine unless you specify otherwise in the config file.
The hosts file is used for name resolution. When resolving domain names, your server will check its hosts file before making a DNS request.
That line you posted will essentially make your server resolve "plato.example.com" and "plato" to that IP address. Thats why you'll generally see the first line with 127.0.0.1 localhost localhost.localdomain ....
so the server will always resolve its hostname to itself.
Solution 2:
This makes the system able to resolve it's own name even if DNS is offline. A long time ago there was no DNS, everyone shared hosts files with the name/IP pairs for every machine they needed to connect to in them.
If you look at /etc/nsswitch.conf you'll see that for hosts it (by default anyways) has a line that says hosts: files dns
This means that first it will check the hosts file and if it does not find the name there it will go to DNS. This can save you a lot of network traffic if you have an app that looks up the local hosts's name or IP frequently (well, and you are not caching name lookups which now you normally do).