Generalists are typically better in smaller companies. As companies grow they move towards specialists.
This is typically because of workload. In the early days of a project the work oscillates between front and back end. As projects grow you will have enough frontend work to support dedicated front end engineers and similarly for backend.