In short: there is an auto-magic behavior that Mac OS uses, by default.
You can turn it off in /etc/hostconfig.
http://excitedcuriosity.wordpress.com/2007/08/24/mac-os-x-hostname-determination/
I like the answer by Jack M., but it doesn't work in many environments of the real-world DHCP environments, because you do not have a pre-existing relationship with the DHCP server. Only in a home setup or a corporate setup (where the IT people are helpful), can you get your desired hostname via DHCP.
In /etc/hostconfig
add something like this:
HOSTNAME=your_hostname.your_domain.your_tld
If you want to set it at automatic again, either remove the line or set it to -AUTOMATIC-