When wiring IR Phototransistor, why is a pulldown resistor needed?
The pull down to ground is used to create a voltage divider, with the top half being the relative resistance of the Photo transistor.  Without the pull down, you only have a series resistor, which results in very little if any voltage drop across it in a low impedance input setup.

As a microcontroller ADC is a voltage sensing, not a current sensing device, you require a relative voltage to read, hence the voltage divider.

It also works exactly like a push button, in that the fixed resistor provides a default state instead of leaving the pin floating. In this case, the button isn't a short to VCC, but a variable resistance. It can close a little or a lot.