Hard to respect vague laws. Apple can't read the regulators' minds and figure out their interpretations, or instantly pivot when regulators change their minds.
When did they change their minds, can you provide a link to a previous regulatory decision which approved this behavior?
If you are an amoral profit maximizer, like the average publicly traded company, it's often rational to take risks by entering the gray zone. Sometimes nobody cares that you do that. Sometimes you manage to get a favorable court ruling. And sometimes the expected gains outweigh the eventual fines.
It's almost always easy to comply with the laws by playing it safe. But shareholders don't like that.