If mining is not profitable why people keep buying gpu? profits depend on lot of factors
1) Price of gpu(As mining is profitable online sellers ,retailers all have increased the price of gpu ,rx 56 vega was around 25,000 (around $350-400) couple of months ago now its selling for $1200 ,if you buy gpu for normal price you are already in profit ,check the benchmark for every gpu,certain cards work good with certain algos
2)Electricity cost,if your electricity cost is more than the income you already in the loss
3)Which coin to mine-Most of people go behind the crowd ,if you do so you will end up in loss ,do a little research on the coin and what's the roadmap.
4)Maintenance -This is the most important part is to constantly keep an eye on the rig and maintain the temp and do software tweaks
As a Crypto noob when it comes to real hardware mining this what i know i'm not an expert ,hope this helps