Its a screwy rule based on screwy rules.
1. The NBA and the league should not be considered competing entities, they should be considered a single entity.
2. The union laws in the US are screwy.
3. The NCAA is full of hypocrites.
4. Private associations should be allowed to discriminate to their hearts content.
If all these things were fixed the NBA would be able to have any age limit it wanted anyways. So I'm fine with it. If some 18 year old doesn't like it - blame the union. The union is the one who agreed to these demands, including prominent players who made a ton of money by being able to enter directly (i.e. Lebron, Kobe, KG, et al.) The union is the one who sends these kids into the rookie salary cap, etc.
In terms of competition - if the NBA was paying the rookies so little money, another league could come along and start getting all the good talent and force the NBA's hand. For example like the CBA. You might not like that IBM won't hire you without a CS degree, if you're good enough - you go start Microsoft. If these kids have a problem with the NBA they can:
1. go elsewhere - like Europe
2. suck it up - like most players do
3. start their own league (hahahahahhaha)
4. find a different line of work
the reason they don't do 3 or 4, is the expected earnings are much lower. they will start doing 1 in more and more numbers, since the expected earnings are higher.
Also I don't think the Doctor and Lawyer analogies are good: those are really gov't regulations on who can practice a line of work. If you don't like the law firm's policy - you cannot go into business as a lawyer following your own rules. Granted the trade associations use those rules to raise the barrier of entry for their members, but its government run. The government doesn't stop new leagues from forming - the business environment does. (And for the record, I disagree with most professional licensing. My wife has been a paralegal for 7 years and probably could write your will and plan your trust better than most lawyers at her firm - who tend to be associates with 1-3 years experience - yet she's not allowed to. Not that its something she wants to do. Consumers should be able to make up their own minds about who they trust for information, services, and goods.)