Can anyone explain: why are government works automatically public domain (not copyrighted) but government inventions are not unless explicitly stated?
Theoretically. The US patent system is a mess, from the rubber-stamp examiners in DC to the ridiculous judges in East Texas.
If an unpatented invention is disclosed publically (not through a patent application), then it becomes public domain and nobody can patent it.
Also, the US is no longer "first to invent", but rather "first to file". You could have a claim that you invented it first, but if someone files before you, you are SOL.
Primarily employees and contractors can automatically assign works to the government whether it is copyrighted or patented. Then the government maintains the transferred rights, instead of having to deal with the pesky public domain thing.