There are pros and cons to each approach.
With an in-house team, you have more oversight. Also, your in-house team spends every working hour on your company's projects.
With a marketing agency, you don't have to hire or train anyone. You get instant access to a diverse set of skills. Furthermore, your agency team can offer independent insight into your strategy.
But most businesses are concerned about cost. Hiring an in-house team is extremely expensive, and most marketing budgets are thin at best.
You could hire a single person to handle the task. But to get the real benefits of digital marketing, you'll still need additional talent. At the very least, you need a web developer who can work on your website. If you add in overhead, an in-house marketing team could cost you hundreds of thousands of dollars.