It's been several years since I left Amazon, and nearly a decade since I worked on anything relevant to those questions, but I'll answer what I remember.
The ads were profitable enough that customers buying devices without the ads for an extra $20 didn't quite make up for it. When they started selling the smart covers for the Paperwhite (IIRC the covers launched at $50) those made them more profit than they lost from reduced ad interactions on the lockscreen. I never knew the exact number though, and could be remembering wrong on some of that. Obviously I have no idea what the numbers would be today though.
There was a backend service with an endpoint which could un-enroll a device in ads, and I know that some customers were able to get ads disabled by just complaining. You can also, even today, just pay that same $20 for removal after you already have the device (I just checked on my own device here https://www.amazon.com/hz/mycd/digital-console/alldevices, I go into the device and there's a button that says "Remove offers").
Also, I'm not sure I quite agree with the ads being at odds with the premium pricing. I could have easily turned off ads on my personal kindles (using the aforementioned backend services) and I never bothered because I really just don't find them all that intrusive. The lockscreens you get when ads are disabled are also really boring, so I kept the ads. Recently the tradeoff has shifted slightly, with some of the garbage AI covers I've seen, so I'm not positive what decision I'd make if it were still free (to me), but it's still definitely not worth $20 to me.