Long Term Economic Profit for Perfectly Competitive market
This is because we are talking about economic profit not accounting profit.
An economic profit takes into account opportunity cost. If you are skilled programmer that can earn $\\\$100000$ per year being employed at Google then doing something else like operating your own business incurs an opportunity cost of $\\\$100000$ per year.
Hence in this situation if the person would set up perfectly competitive business, the business would still record $\\\$100000$ accounting profit even if the economic profit would be 0.
Consequently, even in perfectly competitive business people have actual incentives to run those business.