The thing is, you have K-Marts in cheap, run down strip malls. These are the kind of places which you want to avoid at all costs. K-Mart is also not open when you want them to be. They open at 8 or 9 in the morning, and close at 9 at night.
By comparison, Wal Mart has its own lot entirely (no other stores somehow connected to it), has grocery stores attached (in Super Centers), and some are even open 24 hours a day (like mine). Plus, while K-Mart might have 4 or 5 people working there, Wal-Mart has a ton of workers.
My experience with K-Mart is that their stuff is unorganized, over priced, and of poor quality. Wal-Mart, on the other hand, knows what they have in stock, answers the phone, and is a clean and friendly environment.
That's why K-Mart is going under, and Wal-Mart is striving.