I've actually heard this is common practice for people trying to max miles/rewards using Costco as an example. One can purchase a very expensive item online at costco.com as they sell items up to $100,000+ there, and then return at any costco warehouse. At the return point they will not refund onto credit card and will only refund cash/check. So I'd guess many people use something like this loophope rather often.
Illegal, probably not, unethical tougher to say...