The setting allowed him to invent all different kinds of imaginary creatures, myths, and gods. Middle Earth gave him much liberty and he could create practically everything from scratch. A real place would limit him in many ways and the story would not look that magical.