sudo offers many more features than doas. That's doas' strength, and why I use it myself, but it also means you can't use it in more complex use cases. It's a drop-in replacement perhaps 95% of the time or thereabouts, but for the remaining 5% sudo is your only option AFAIK.