The usual trigger for these sorts of Terminal.app environment oddities is something weird in the local login scripts.
Some add-on tools can modify these bash scripts and sometimes without the user realizing it. (Errors related to PATH are one of the more common symptoms here, but all sorts of weirdness is possible.)
Usual suggestion is to see if a different login works (different user), and also to rename (mv) the usual login files away from their standard names to disable them, and closing and restarting Terminal.app.
In general and FWIW, you should not be logging in as root. At all. That's something that Apple has been discouraging for a while now.
Server.app should not be modifying the login scripts.