Actually, sounds and midi are two very different things. MIDI stand for "musical instrument digital interface" and is simply a standard adopted by the music industry that allows digital based musical devices to communicate with each other. So, audio (sounds) is not directly a part of the MIDI communication protocol.
The sounds within the majority of today's keyboards are (generally) not intended to be transferable for use in the fashion you describe. (There are some specific exceptions, but for brevity I am not addressing those.) Internal sounds stored in ROM ("read only memory") are typically in a specific manufacturer format that is only read by the keyboard. Those sample formats do not usually export in the fashion you describe.
There is a work around, however it requires specialized software and somewhat advanced knowledge (and skills). You would need to "digitally sample" each sound and create samples in an appropriate format for use in other software based programs. Once the samples are created, then you have edit and map them (assign to notes) so you can play them.
This topic is much more complex than I can address here, but I hope this short input answers the question. It can be done, but it requires some fairly advanced understanding to do it. Don