Businesses who offer free wi-fi spots benefit from offering these services by bringing in customers. People will go to these locations and may benefit the business.
Internet connections are relatively cheap, so they just consider it a cost of doing business. It will also usually pay for itself by drawing in more customers.