The role of profits in the model of perfect competition is to signal entrepreneurs to enter the industry.
If you are trying to decide if starting a business and entering the industry is a good idea, seeing others make money will encourage you to do so. Seeing a high profit return on your potential work is helpful when deciding to enter or not. If you saw no profit, it's likely entering the industry wouldn't be a good idea.