How do people find out hidden UserDefaults
Did Apple document all the usable preferences for their software?


Yes.  The first place to look is, well, Apple's Documentation Site.  Virtually everything that has to do with your Mac and the OS will be documented here.

Additionally, macOS is built upon a core BSD kernel so lots of the Terminal commands you see referenced to here actually come from that space.  One of the best places to learn about BSD is from the FreeBSD Handbook; arguably one of the most comprehensive documentation source for BSD.  Personally speaking, coming from that space (and I'm still a "resident") to macOS was very straight forward.


  Did these people know people that work for Apple and therefor built
  these tricks?


They're not tricks; it's Apple's framework.  Everything from how the user interacts with the desktop to what happens when you save a file is based on a well documented framework. 


  Are these people just nuts and spend all their day punching in random
  defaults looking to see if any of them do anything?


Nuts?  A very emphatic NO.  However, I can say for certainty we are a curious bunch and always on a quest for knowledge.  I know I have spent lots of time in front of the screen just "see what something does" in the pursuit to expanding my knowledge base.

That said, finding these "defaults" is usually from necessity (i.e. we have an actual problem to solve).  A good deal of it is done via research as well as trial and error.

I have VM (virtual machines) running on my iMac with different versions of macOS just to simply try things so I can experiment without the fear of catastrophically messing things up.

If this is something you wish to explore, I suggest you start by surfing through this site and find "issues" that pique your interest.  From there, try the solutions to see what happens for nothing more than the sake of expanding your skill set.