Even at its full range of 10 miles it would have a tough time hitting a commercial plane. 10 miles is 52,800 feet so the warship would have to be very close to the plane to hit it (almost under it), and within visual range for sure, meaning it wouldn't happen by accident. A ballistic missile on the other hand can travel 1-3,000 miles to hit a target.