Lots of memory is not so necessary to sound "good" as to sound "realistic". One of the things that lots of memory allows you to do is to have long samples. Short samples must be looped to sustain--which can make them sound unrealistic. Long samples can have much more realistic decays. Another way to save memory is to use a single sample for a range of notes and use it for all velocities. However, this can detract from realism. Yamaha has some console keyboards with about 100MB for a piano-so that each note can have its own samples at five different volumes (velocities). But if you only need something that "sounds like" an acoustic piano, 1MB will do.

Note that analog synths and physical modeling synths do not need any sample ROM at all to sound good. But analog synths do not provide realistic emulations of acoustic instruments. Physical modeling synths can provide realistic emulations of some instruments, but rely on lots of processing power instead of sample ROM.