Return shipping is usually up to the customer and shipping back to China is much more expensive than the initial China to the US charges. Sometimes it exceeds the cost of the item itself to try to send it back so it's just cheaper to eat the loss.
That's down to store policies though not any legal requirement. And in the case of Walmart you're not shipping back to China anyways you ship back to some distribution hub/return center in the US. Amazon too often the products are staged and returned to the US.