You could ask why bitcoin mining exists at all because it is essentially marginally profitable and by your logic bitcoin itself doesnt make any economic sense!
Bitcoin mining != Bitcoin itself
Although I do agree that most Bitcoin mining is a bad investment and people largely do it as a hobby or for fun. Those people who do it as a business generally do take a large risk and don't make a very large profit. Compared to buying Bitcoins and holding them, mining isn't usually a good deal. The biggest problem is technology raising the difficulty before you can pay off your hardware expenses.