Apple preventing 3rd party software not paying the apple tax from running on their phones is not "free market". The only reason they can get away with this is because of laws that protect their market from 3rd parties.
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.