The prime reason not to purchase a real piano is cost. A real piano is most expensive. A digital piano is in the middle range, and a synth is quite a bit less.
Space is another a consideration.
An electronic may be easier to sell, they say. If it's not possible to sell it, then the child can still fiddle around on it and perhaps rekindle interest in lessons at a later date. If you want to be able to hook up your computer to this keyboard, you need a MIDI port. In a piano, the sound is produced by a felt-padded hammer hitting a string under tension. The piano really is a percussion instrument.