2017 Macbook-Pro did not want to turn on? I bought my Macbook pro about a month ago and have been liking it ever since. But today i had something really wierd happen to me! 

1 of the 4 USB-C ports were not letting me charge through it. After a while I wanted to restart the macbook because for some reason it was slow. After the macbook turned off, it didnt want to start up anymore, it said the battery was empty but when i restarted it it was 38%. 

I managed to fix it by resetting SMC by holding shift-control-option and the power button for 10 seconds. 

But i want to know what causes this to happen? For a new laptop its quite wierd for you to not be able to start it up. Especially a 3500 euro macbook. 

Thanks in advance!
The System Management Controller is a subsystem responsible for power management as well as fan control. It is not unusual for it to get into an undefined state. Power spikes, i. e. can occur at any time and may influence the SMC. 

So the question is not why or when it happens but how to resolve it. You have already posted the answer which is to perform a SMC reset. Therefore keep going with your MPB—there doesn’t appear to be any problem.