As the others mentioned, most are probably trades, or dealer owned "loaners" that are being sold.
That said, yes, they do sell the trucks they buy back. Here's the catch though. If they buy it back they don't have to disclose that it had repeat issues unless it was deemed a lemon and they were forced to take it back.
My brother had a Saturn back in 2000 that was a lemon. He took multiple trips to the dealership for a shifting issue (transmission, computer, idk they never solved it), and he started talking about lemon law with the customer liaison. Rather than force the issue and be required to take it back as a lemon they offered to buy it back at what turned out to be a very good deal for my brother. He basically drove the car free for a year (when it wasn't in the shop), but since it wasn't legally deemed a lemon, they didn't have to disclose it.
Long story short. Yes, lemons are resold but only disclosed as lemons if the entire process is completed and the manufacturer is forced to take it back under lemon law. The easiest way to see if it's a trouble vehicle or simply someone who upgraded is to look at the service records. CarFax reports service done at the dealership so you will quickly/easily see multiple services for the same issue. If the record is clear, it's just a truck someone didn't drive a lot. Heck I sold my '18 Wrangler with about 14,000 miles when I bought my Ram. Some people just don't drive a lot.