maybe Tesla's attempt at keeping their wheels only on their cars (and not on a leaf

)
I can shed some light on this one...
Bolt Pattern, properly known as P.C.D. for Pitch Circle Diameter, is generally chosen based on the size, weight and load requirements of a given vehicle.
As I previously discussed
here, the wheel/tire load isn't carried on the horizontal hub surface and center bore hole of the wheel, it's actually carried through the much larger vertical surfaces where the wheel and hub/rotor are sandwiched together. So it's critical to make sure that when you choose the bolt pattern for a given application you make sure you have enough clamping force and that it's spread over a large enough area to deal with the all the forces that vehicle will see. Adding more fasteners increases clamping force, as does increasing the size of the fasteners, and spreading those fasteners further apart adds more strength and stability to the whole assembly. However doing so also adds weight. So there's a careful balancing act that goes on during the vehicle design phase to decide how large the bolt pattern needs to be to handle all the loads vs. how much all the affected components - wheels, hubs, bearings, rotors, etc. - will weigh.
In the end the reason the S and the X have the larger 5x120 pattern is because they have to carry significantly more weight and deal with much higher dynamic loads. The 3 can get away with the smaller 5x114.3 pattern and save that component weight, which of course is especially beneficial with anything on the car that rotates as it also reduces the energy needed to overcome the inertia to get these parts up to speed every time you accelerate.