Isn't it possible to write data from DMC or from barcodes directly in the Tangle?
Yes it is possible. But it is even more interesting to automatically verify through the Tangle the information contained within a barcode or Data Matrix Code. That is, DLTs in general and the Tangle in particular, can be used to store transactions that allow verification or to track the provenance of information contained in barcodes or DMCs.