What are the reasons behind a firm experiencing economies of scale first, followed by diseconomies of scale?

What are the reasons behind a firm experiencing economies of scale first, followed by diseconomies of scale?