Not to be flippant, but why are there parties? There's all that work involved, and expense, and the mess to clean-up afterward! The answer is that it is fun. Otherwise nobody would do it. It is also why people who never throw parties tend not to be invited to many.

There is of course a commercial dimension to a regatta, because space on water and the facilities required to feed everyone, and store boats cost money, as do crash boats and fuel. These are fixed costs that the club pays from member dues. Other costs like trophies and food and t-shirts and beer are paid out of the regatta fees, primarily. But at our club we are not required or even encouraged to make a specified profit on any event, and in the past I have aimed for breaking even. I generally have a small amount of money left over as a courtesy to the club, because there is a lot of volunteer labor going into the mix and I feel I should compensate the club for all that. But it is not a requirement and no one says anything about it.

There is definitely a tradition of reciprocation in sailing. This applies to sailors as well as clubs. Hence all the exchanges of burgees by visiting sailors, and writing your home club on the entry form. The notion is that as a sailor no matter where you are there is a certain ethic and you will be offered hospitality at other clubs, and that you will offer other sailors the same at yours. Perhaps this is a holdover from the blue blazer days, but it sure is a nice holdover, especially when you've been on the water in your dinghy all day getting the snot beat out of you and, looking like a drowned rat, you walk up to a foreign club that is about five stories tall with its own parking garage and they say "Come on in". The tradition is also very important in cruising, where boats put into new clubs all the time.

As to why people race, again I would say that it is fun, and regattas add to that fun by getting new sailors into the mix. As someone else in this thread said, getting beat by the same people over and over again makes for pretty stale racing.