Dogs should always be restrained inside of a vehicle. Whether you use a barrier, a seat belt harness or a kennel. I have a Great Dane and he gets buckled in with a soviet travel harness.
I was pulled over for a speeding ticket a few years ago and had to take that class to have the ticket removed from your chart. Anyways, they made us watch this horrifying video that has been imprinted in my brain.
Please take a few minutes to watch this.
Video Shows What Can Happen With One Unbuckled Passenger | 99.9 KTDY
This can happen with not only a human, but a dog.. or really anything that you don't secure tightly in your vehicle.
I've even seen guys on here that have the cargo barrier just to protect themselves from off-road materials they keep in the back. Smart!