It was much cheaper to film in Italy so many low budget westerns we’re done there. Hence the term “spaghetti western”... Comparing American westerns at the time showed great differences(to me the strong moral characters, the orderly towns, and clean housing and structures made the American movies unreal). Leones characters and building structures were all flawed....just like real people and places for the time....
Actually, It was mostly filmed in Spain. The spaghetti part comes from the Italian film crew and extras and what ever studio work (interior sets) was done in italy.