NEW YORK, June 27 (Reuters) - A U.S. bankruptcy judge on Tuesday approved Overstock.com's $21.5 million purchase of Bed Bath & Beyond's brand name, intellectual property and ecommerce platform. U.S. Bankruptcy Judge Vincent Papalia approved the sale at a court hearing in Newark, New Jersey, saying that he was "gratified" to see a bidder emerge that would preserve Bed Bath & Beyond's brand. Overstock emerged as the winning