No coincidence is correct. It has been mentioned the success of Star Wars by George Lucas, was influenced by other genres, like samurai films from Akira Kurosawa, and from Westerns by Sergio Leone. And in similar fashion, it has been mentioned, Appendix N in the AD&D DMG showcases the influences Gary Gygax and others had with the fantasy genre D&D was set upon, which included Lovecraft horror and Boot Hill too.The overlap between how American fantasy conceptions came about in D&D, and how America created a mythic and fantastical "Old West...."
.....are not a coincidence. IMO.
(Remember that many of the people who created D&D in the 70s and 80s grew up consuming Westerns when they were younger)