Mindless undead are neutral evil gaining the evil bias due to the fact that they are animated by negative energy. Negative energy is evil, and any act of manipulating negative energy is also evil.
This is not one of those "oh but it could be used for good" questions, it simply is. Manipulating Positive energy is a good act while manipulating Negative energy is an evil act. This statement is cannon D&D and the premise upon which a good number of things are built (for all you old timers this was changed in 3rd edition a bit from 2ED. One of the related changes being the change of all cure spells from necromancy in 2ED to conjuration in 3ED+.)
Golems are not animated by negative energy, they are animated by some form of magical energy, though unlike undead, golems are not one of the areas that I know thouroughly so I'll just leave it at that rather than chance saying something that is incorrect.
The alignments of Intelligent Undead (lichs, some rare mummies, non-mindless vampires) are subject to a bit more freedom since they have the capacity for choice.
Edit: NWN by default makes a lot of undead chaotic evil. In the majority of cases this is incorrect.