What will be informative, beyond the doc, is for you to find out WHERE in your code the macro variable &CUSTSEGS is used. For example, if you search for the macro variable in your code, you might find something like this:
if WOMBAT in (&custsegs) then do;
... more code ...
which would tell you that the macro variable &CUSTSEGS is used in the IF statement to supply values for the IN operator that is testing the value of the dataset variable WOMBAT. If you then did a PROC FREQ:
proc freq data=lib.dataset;
you would find out whether the values of the WOMBAT variable were correctly specified in the %LET statement inside the %STR function.
Generally speaking any of the Macro Quoting Functions, including %STR are used to mask or hide the normal syntactic meaning of certain special characters, as defined in the documentation. In this instance, I suspect that %STR was used in the %LET statement because someone felt that the single quotes or the pipe symbols needed to be "protected".