The barrel is a unit of volume used in the oil industry with the symbol bbl.
Oil is more commonly expressed in terms of cubic metres (m³) but in the US and in the economic world (mainly because such a large percentage of the world's oil is shipped to the US) as barrels.
The measurement of the barrel originated in the US at the first oil well in Pennsylvania. There were so many variants of barrel size (including those used for wine and other goods) that the distrust became so prevalent a central and standard barrel size was created. This was finally established in 1872 as 42 US gallons.
The cubic yard is a unit of volume derived from the imperial system of units. It uses the symbol yd³.
It equals the volume of a cube with edges that each measure 1 yard. It is equivalent to 27 ft³, 46656 in³ or ≈ 0.764554 m³.
The yard (and derivatives like the cubic yard for example) are the same in both the imperial systems and US customary systems so require less conversion systems to calculate / convert to SI or metric.