Encoding is used to know how data is stored, and can be used by serialization formats.
For instance, DV_PARSABLE.value or DV_MULTIMEDIA.data can be stored RAW (as they were received/recorded), MINIFIED (applies to parsable, remove all tabs and pretty format whitespaces), BASE64 (applies to multimedia).
For serialization, especially for binary data in XML or JSON, we need BASE64.
Since there is no way of specifying the encoding on the DV_ENCAPSULATED, we need to rely on software implementation guides and ITS to know how to decode data we receive from external systems. With the encoding field, the decode is know by just looking at that field's value.
on example of encoding use is on the ED datatype of of HL7 v2.x