Mine is due to a sensory problem I was born with (likely as part of my autism). Some internal senses don't work as well for me. My stomach just sends an undifferentiated error, could be thirst, hunger or nausea, and I have to figure out which it is by trial and error. With my bladder, the problem is, that when I concentrate on something, I don't notice my bladder until it is close to bursting. In school, this wasn't too much of a problem, since lessons were 45min long, and I could check in with my bladder between lessons and use the toilet.
Later as I got to university, especially during exams, 2-3h exams became common, and the need to ask to go to the toilet made things so bad, that all I could do is cramp things shut. The next problem was, that once I was on the toilet, it sometimes took 30min or more to relax to finally be able to empty my bladder. So at first I started wearing diapers for exams, then also for revision, and long assignments. I sometimes went 24/7 for a month or two, but shame would always make me stop and go back to only wearing during exams and long assignments.
As I got close to my Masters degree, the time I was expected to do experiments and work on my own, for hours at a time, increased. The problem got a lot worse, and I finally decided to wear diapers 24/7. That time I started accepting them as a tool to help me manage that problem. I also noticed all the mental energy I've spent worrying about my bladder, frequently querying the feeling to see if I should go to the toilet, or could last a bit longer, when I wasn't working on something. The use of ADHD meds also made my concentration deeper. Since distractions had sometimes helped me notice my bladder before it became bad, the problem was of course compounded by my ability to concentrate better. I also noticed that they helped with a negative sensation I've always had about my crotch, which I later identified to be gender dysphoria.
So, yep, I could have probably managed without. However choosing diapers over other, more distracting methods of managing that problem, was the right decision in my opinion, because I'm left with more spoons.