It depends. A well-trained agency that has experience in making custom websites possesses a wide range of expertise, well-developed workflows, and accelerated delivery. In-house provides a more direct control but involves the need to hire, train, supervise. In the case of ecommerce websites being developed with unique components (shipping logic, APIs), an agency can often be efficient in that case unless you already have senior technical personnel.