Isn't this fee for apps that are distributed outside of Apple's app store?
No, the CTF applies to any developer who accepts the new, post-DMA terms. So a developer can (1) stay on the old terms and will be required to stay in the App Store (no CTF); (2) accept the new terms and stay on the App Store voluntarily (and pay CTF); or (3) accept the new terms and distribute outside the App Store (and pay CTF).
But if Apple allowed developers to accept the new terms and pay nothing for distribution outside the App Store, everyone and their mother would do so and iOS would be a hot mess.