To my understanding company do ICo to raise funds to start up their project !! But many most project listed their token on exchange after the ICO and forget about the mean project and got away with investors money . Why all this is happen ?
A bit of both. First you need to understand not all companies succeed, so just because one company makes an ICO and than starts to go bankrupt and not give you what you were promised doesn't mean they are scammers, I have seen many coins and been part of a lot of them from inside to know that some of these coins just go bankrupt because they fail to do what they think they would do. However, of course there are scammers too which is why securities tokens will be a bigger thing in the future and instead of ICO we will have STO soon.
Without the failing part though, ICO is also a part of new way for companies to sell shares not to resemble the IPO in nasdaq or nyse style but more like to angel investors, instead of giving away 10% to some silicon valley angel investor, they give it to the customer and start the company up, IPO is more like a currently established company to get even bigger, ICO is a company that doesn't exists but will with enough funds.