The reason for this can be seen in the definition of economic profit and in the definition of perfect competition.
Economic profit means profit after you pay out your explicit AND implicit costs. Therefore, zero economic profit does not mean you didn't make any more than you paid out. It means you made exactly what you paid out (for workers, supplies, etc) PLUS what you yourself could have been making if you were doing some other job. So you're still making money when you make zero economic profit.
In perfect competition, if a firm is making positive economic profit, then other firms will jump in because they will see there is money to be made. Firms will jump in until economic profit falls to zero.