Clothes, household goods, furniture, etc are much better at Target, but the real reason is because Target is nicer. It's cleaner, better designed, the employees are drilled into being helpful (I worked there)—it just feels better to be at a Target.
They get fashion designers to do collaborations with their clothing line as well, which helps their image. 3.1 Phillip Lim for Target a couple of years ago sold out instantly. In general their clothing is on par with a real clothing store. I have a cardigan/jacket thing I got there in 2011 that has no holes or damage.
Walmart has a "lower class" reputation, and so do the people that go there often.
Don't get me wrong, they are both big box stores. They aren't that different under the hood, but Target managed to present itself with a cleaned-up image that attracts a lot of middle and upper middle class people who don't want to be seen at or go to Walmart.