If you get off of an instrument while you’re playing–like immediately after pressing a note (or notes)–they’ll play again once you get off the instrument.
Get on an instrument, spam some keys, then get off of it quickly.
After I get off the instrument that the existing sounds stop sustaining and become inaudible and no new sounds are played unless someone is actively on the instrument and playing notes.
The last set of notes played will repeat after getting off of the instrument. Because there’s not a player there to like–let off of the keys or get off the piano–the notes will play out/sustain in full.