The snippet above will grab the value as it is and return it as a string.
If you are checking a product which has a series of values separated by | pipes | then it will return the full string with pipes included.
For example, it will output value 1 | value 2 | value 3.
If you are deliberately wanting to work with data in this way you could use php explode to combine them into an array and then work with them individually.