Redbox rents out DVDs/Blurays from physical kiosks. Normally they buy the discs straight from the studios (or whoever the studios go through). As a fallback, they'll literally buy them from Walmart or whoever, which I'm pretty sure is how they originally started before they were big enough to get the deals going. They still don't have a deal with Disney, so they buy them at retail from some unnamed vendor.
Disney retail movies come with a download code for digital copies, which Redbox has no use for, so they sell that code for cheap and everyone wins (besides Disney). They could literally throw the code away and still profit.
Does that help? You were basically on target.
P = (# of rentals * $1) - $32
where $32 = the $20 disc cost + monthly var cost
If redbox rents the movie once per week, their per disc annual profit is $20
But, if redbox can now sell the virtual download code for $8 online (essentially $0 variable cost for holding digital inventory), and digital sales has little impact on physical rentals, then the equation would be:
P = (# of rentals * $1) - $32 + $8
With annual profit per disc in the 1x/wk rental case now $28, or a 40% gross margin increase. All #s are just napkin math/assumptions, but it's easy to see the benefit here for redbox.
The easy answer is "they get more money if they sell the code as well as the disc, instead of just selling the disc".
Also the disk is usually a LOT more expensive (up to $100 for a new blockbuster release). DVD store fronts were already so low margin, it didn't take much disruption before they started to go under.