If you don't have a specific product that you want to build, then I think it's a more viable path. Running the agency gives you a stable revenue and base to bootstrap a product when a product opportunity becomes available. Running an agency also gives you insight into pain points that multiple different companies are hitting.
So, an agency as a path to eventually developing a product makes some amount of sense but an agency as a path to develop a specific product vision probably doesn't.
I think this is a neat way to start as it's validation (someone is paying) and your first customer (which is the hardest to get) all in one shot.
Intentionally following this model doesn't seem sensible though; with VC money so accessible if you have already put together a good team you might as well focus on the product itself. Agency work is not fun.
Fine for some; certainly not foolish to go a different route. Basecamp never wanted to be huge, just successful. I'm working on a project that our company funds through agency work, and it's fine.
For example let's say You're building homes using a special process that you're developing in house. Your clients just want homes, but while you're building those homes you can and keep working on your process until you can sell the process to a conglomerate of some sort.
I will say it can be extremely stressful since you have to both support your core product, and your agency shop work.