It does seem kind of silly, but it might actually be more hardware-related than it would appear at first glance.
HEIC encoding and decoding have almost certainly been hardware-accelerated on the A-series chips ever since Apple adopted the format. I wouldn't be surprised if the encoding part is even baked into the ISP stack at this point. HEIC is a lot more computationally intensive than classic JPEG, so it's both a speed and battery advantage to do that in hardware rather than in software.
Switching to JPEG-XL, which is presumably similar in terms of computation requirements, would then mean Apple needs a hardware-accelerated pipeline for encoding images in that file format, thus tying it to the A18 SoCs.
The alternative would be switching all iPhones on iOS 18 to encoding JPEG-XL on the CPU rather than HEIC on the ISP, and I think the firestorm of criticism for making the camera slower and more battery-intensive on all existing iPhones is something they definitely wanted to avoid. JPEG-gate!