George Lucas paid a lot of tribute to Herbert's Dune. Tatooine/Arrakis. Star Wars did not need a desert planet, the choice would be completely random to this story except for the Dune mimickry. Wasn't Luke's adoptive father a moisture farmer? I'm sure you can easily find other similarities for yourself. The one major difference is Herbert's complete lack of computers, robots, and AI technology.
"...And if this still is not enough for you to believe that without Dune, there would actually be no Star Wars, I recommend this last piece of information to you: The original
script for Star Wars was rejected by the studio because it was almost exactly the
same story as Dune."
(Lucas threw in lots of AI in order to distance himself from the idea of Dune plagiarism.)