Not all ICOs were scams...but also plenty of IPOs have been scams. The regulations put in place following the dot com crash are good in some respects but bad in others.
The ICO mechanism for fundraising is novel and with some light regulation and heavy curation might have the best of both worlds.