I do not know if it changes after rebbot, after changes in the GUI, for example - turning on TLS it's changes to localhost and localdomain. At the moment, I changed the template to my own.
the hostname change I cannot explain.
however regarding the domain-name - what's the search line in '/etc/resolv.conf' ? (pmg uses this to find the system's domain name)..