My math doesn't match yours. Let's see if we can bridge that:
Ideal: 85 kWh / 300 mi. = 283.33 kWh/mi.
Rated: 85 kWh / 265 mi. = 320.75 kWh/mi.
Where am I going wrong?
It's been noted, we don't have full access to all 85 kWh, there is still a question as to whether there is a reserve, etc. I just use 300 because it's what Tesla seems to use.
You have a unit problem (change kWh/mi to Wh/mi at the end).
Either way, 40A delivers far more than 20 mi/hr of charge regardless of whether you use 280, 300, or 320 Wh/mi.
- - - Updated - - -
If, OTOH, the math (but apparently not my math...) shows that rated should be > 32 mph for the Ideal setting then it indeed might be a bug if the UI is showing less for the Ideal version of the UI.
I'm not going to continue to overanalyze the math because it will make me cross-eyed this late at night and we don't have all the necessary variables, but I have come to three conclusions that I can make:
1. Showing 20 miles per hour of charge is clearly wrong, regardless of which math you use or mode (rated vs. ideal) you're in. That was the OP's primary argument. In fact, you only begin to approach 20 mi / hr of charge when you get to 208V @ 30A, a far cry from the OP's 235V @ 40A. Could this perhaps be a leftover of the "projected" math?
2. The ideal miles per hour of charge should be higher. I really don't care about ideal miles, because I'm currently averaging 400 Wh/mi anyway. That's because I drive like an idiot: a smiling, happy, gleeful idiot. But for those people who like to drive the model S like the average Prius driver (slow with no go), ideal should show a higher ideal miles per hour of charge.
3. Based on my experience, charging my car @ 245V, 40A yields ~31-32 rated miles per hour of charge. While I don't know how Tesla derived that number in the first place, it happens to be correct.