It's amazing to me that people in this thread still don't understand free markets. You are free to use Android, or Amazon phone. Or Graphene. Or one of the many others.
Apple restricts third parties almost entirely through technical measures.
Jailbreaking to bypass the technical measures is legal.
Looks like the lawsuit was settled not decided, and Apple is free to sue it's next victim.