As a general rule, the cargo in every truck on the road must be firmly secured so that it cannot shift or move during transportation. This can be done with bars, tiedowns, dunnage, dunnage bags and other types of devices. It's about more than just keeping the products in the truck, but about ensuring that they won't shift, causing a weight imbalance that could lead to an accident.
As noted, there are many tactics for doing this, with the most common being tiedowns. These are heavy straps that often have a ratchet system in the middle and two hooks in each end. The hooks can be inserted into anchor points in the truck, and then the strap can be ratcheted down until it is incredibly tight. This system allows for a far more secure hold than ropes.