That syntax :
(vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
is general approach of retrieving enames from sel. set obtained by using any (ssget) method...
It is often used when you don't want to iterate through sel. set and form entity list by using (ssname) function... (ssname) approach is better, because it's faster than (ssnamex), but anyway those differences are measured in few milliseconds ranges... Common thing is that you use (ssnamex) when you want to make code concise and quickly get resulting ename list...
First part (vl-remove-if 'lisp ... ) is used just in situations where beside enames in list (mapcar 'cadr (ssnamex ss)) there are other elements that are actually lists - (mapcar 'cadr (ssnamex ss)) = (ename1 ename2 (list1) (list2) ... )... (vl-remove-if 'listp ... ) ensures that resulting output of complete syntax is list of only enames... Now I forgot an example, so I may be wrong, but (setq ss (ssget "_X")) and then (mapcar 'cadr (ssnamex ss)) will produce list that beside enames has also other not relevant lists as elements... So in any situation (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) is more reliable approach than just (mapcar 'cadr (ssnamex ss)), but some users still are using shorter (mapcar 'cadr (ssnamex ss)) as they are sure that (ssnamex ss) don't give side lists within output resulting list - i.e. (setq ss (ssget "_X")) wasn't used for storing ss variable for later usage in (ssnamex ss)...
[EDIT]
Just checked : (setq ss (ssget "_X")) (setq elst (mapcar 'cadr (ssnamex ss))) [elst contains only enames]
Then : (setq ss (ssget)) ;selected couple of lines, lwpolylines... (setq elst (mapcar 'cadr (ssnamex ss))) [elst contains enames + one list at the end]
Conclustion : (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) should be used if (setq ss (ssget "_X")) wasn't used - i.e. for other methods...
So I did forget, but anyway main story stands : (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) is choice with which you'll get enames list in any situation...
[/EDIT]