You're missing the point. Selling a closed device is legally permissible whereas attempting to strong arm behavior of other companies is deemed anti-competitive. So apple is within the bounds of the law (regardless of whether you approve of that) while google is not.