They get square watermelons by growing them inside of square glass cases. That way they can fit easily into an overcrowded refrigerator, and you can stack things on them.
Square watermelons are expensive though (10,000 yen or about $82). Compare that to regular round watermelons which cost about $15-20 in Japan.
The square boxes they're grown in are the exact dimensions of Japanese refrigerators, which means they fit perfectly. At $82 each, these square watermelons probably wouldn't be too popular in the United States. Our solution for a lack of refrigerator space? Smaller, seedless watermelons.