My understanding is that this is a trim piece to eliminate the "gap" that would otherwise be there. Meaning it would lend to a very cheap look and seem to be 'mis-installed' without it. Too much light shining through and seem like the bed was too far back without it.
Wind, rain and debris can get all in there anyway (and does). The beds move quite a bit on Pickups (Fords are the worst for this) so the gap is needed.
2016 3500 Laramie MC: Bilstein 5100's up front, 20" Fuel rims with 275/65-20 Micheline LTX MS/2 tires, Weathertec Floor mats, 45 gal RDS tank, Hensley TS3 hitch, Billet DEF and Diesel caps, DeeZee tailgate assist, Bull Ring retractable stake pockets, Amp Research steps, hybrid window tint.