I want to ask how does the people that do bounty make money.I mean they are giving away money for free.How is it profitable for ICO teams?
Because very less amount of people invest in their ICO through bounty. 
Your assumption (the bolded part) is clearly wrong. You should take a look at it and see how many ICOs easily gained millions of USD in several days. So there are absolutely a lot of people who are willing to invest in ICO. Besides that, most ICOs don't pay their bounty participant in USD/BTC/ETH or any other worthy altcoin. Instead, they use their own token to "pay" the participants so they actually don't spend any single penny for bounty. That's why running bounty campaign is considered profitable.