Races do have expenses to cover, but the larger, syndicated races are price-inflated to up their margin. That said, it's easy to still get a good deal but you have to sign-up far in advance. 10km is a semi-common distance but it seems more popular in trail races than road races. Group runs, not necessarily races, are a lot of fun, at least in my experience. It's been a great way to meet people and learn more about running.