It is not a lock-in at all, and it also not strictly enforced or enforceable even , plenty of times I have given cash when a vendor offered me a 2 % discount on a large purchase where the extra hassle was worth it .
Your assertion seems to be that just because you got away with it that it's "not enforceable". I would argue that just because it's a clause in a merchant contract (a very important contract for a small business), it's a significant threat.
The comparison is not the same at all, No merchant gateway is blocking cash transactions just forbid different pricing.
This is miles away from what Apple can do. A payment g/w can only at best stop payment processing as it happened wikileaks or more recently with SciHub.
Apple can kick you off the market effectively by blocking access to app store . Either the app store should be treated like a utility given its monopolistic nature or not be allowed to push their second service (payment g/w, lots of competition) because they have control over first one App store (no competition), in another era this would be classic anti-trust .
I just want to know that my license to use an app purchased in 1 store means that the license follows me (or my account or my estate, etc), not limited to that one app store. If I buy a game on Steam, and later move to a PS and later move to XBox, I don't want the loss of value associated with losing all copies of my legally purchased/licensed content (or worse, if my account is closed/banned on one platform).
This is also what is destroying any potential value to electronic health records (although doctors seem to hate transcribing their notes, so the value may be limited anyway).