The European Court of Justice’s decision in the case could impact comparable restrictions applicable to other professions.