This question already has an answer here:
I saw the term pull-up resistor being mentioned everywhere, but I haven't grasp the reasoning behind its use.
It is explained that
... pin 2 is normally held high by the 10-k pull up resistors.
But why use a resistor? If we want to keep pin 2 high, can we just make a short from this pin to Vcc? If we just want to limit the current, I thought we can do it somewhere else, for example by adding a resistor between the output pin 3 and the ground?