How does connecting base and emitter help in this switching application of transistor
Adding R2 ensures that the base is biased firmly to turn the transistor off when the input is floating. Some transistors may leak collector-emitter current when the base is floating, some may not - transistors vary in characteristics quite a lot from device to device so it is wise to design your circuits with these large variations in mind. Assume you have the device with the worst characteristics in the datasheet, making sure you interpret the datasheet correctly when you do that.

In light of that, stability is referring to the stability of every circuit, be it made once or manufactured by the million. Keeping your circuit away from boundaries that can cause individual circuit behaviour to vary is a fundamental of design.