There are three possible outcomes when the command is selected based on the current selection as follows.
1/ If no entities are selected then all of the entities on the current layer are selected.
2/ If a single entity is selected then all entities on that layer are selected.
3/ If multiple entities are selected then all of the entities on all of the layers that contain those entities are selected.
This command is particularly useful to select all items on specific layer(s) to either:-
1/ Delete them.
2/ Move or copy them etc.
3/ Change the properties either colour, layer, style etc.
4/ As a visual check to see if entities are or not on the correct layer.