The verb is infinitive with no particular subject.
"Why choose one when you can choose both?" - https://www.reddit.com/r/Kanye/comments/ph6sab/why_choose_on...
"Analyzing Systems: Why Do It That Way?" - https://digitalcommons.georgiasouthern.edu/cgi/viewcontent.c...
"Why be afraid when God is always showing the way?" - https://www.archstl.org/popes-message-why-be-afraid-when-god...
Despite the lack of a subject, it can trigger reflexive pronouns:
"Why limit yourself to just 3 wishes?" - https://www.brainzmagazine.com/post/why-limit-yourself-to-ju...