I didn't find it a waste of time.
As someone who went through YC at 27, I think the structure, personal input, coaching, and the community (IMO most important) are incredible resources to increase the likelihood of success for your startup.
When you are creating a startup (defined as company hoping to experience hyper-growth/ hyper-impact), it is so hard that you need to accumulate as many resources and success factors as possible.
Knowledge is a huge portion of that - but YC packages significantly more advantages not only into ~3 months but also into the constantly evolving network it has cultivated.