If you're willing to settle for what the masses ride in China, than you cannot build an ebike for the $600 it cost to buy the former. Yes, you can buy a $300 battery and $100 motor from China, but there's a ton of shipping charges.
On the other hand, if you understand the technology and own one or two ebike batteries, the incremental cost to build an ebike is very low, especially if you have a box of used bike parts.