Is it legal to create your own stm 32 board
Probably de facto legal, but if you copied someone else's layout, infringed their patents or trademarks, infringed copyright on their firmware/software (if any), copied their photos, made it look like someone else's product so that customers might be confused, or are in breach of any of the various laws that might be in your jurisdiction on EMI emissions, mains voltage connection, Pb or other allegedly hazardous materials content etc. it might not be. 

And that's without even getting into potential consumer protection laws. Sometimes it's cheaper to give things away than to take  money.