A sound made in a large empty roonm produces an echo because it bounces of the walls and the roof of the room.A bat uses echos to find the location of its prey.
Sounds echo when there is nothing else to absorb the sound.
So in an empty room, there would only be the walls to absorb the sound, but walls don't absorb sound. They bounce it back. So, when you are in an empty room or a cave, nothing absorbs the sound and it is bounced back.
However, if you were to put a couch in the room, it would no longer echo, because the couch soaks up the sound.