File this under bug or under the inexplicable decision column. For the longest time, Android has had an option under WiFi settings that lets you change the default behavior (always on) to turn off WiFi during sleep all the time or only when it’s not charging. It’s one of those neat hidden features that we rather recently remembered as super useful in one situation: if you want to avoid draining a secondary device (think tablet, often) and prolong its battery life without keeping it on the charger all the time.
Google inexplicably removed the “Keep WiFi on during sleep” toggle from the Pixel 2 was written by the awesome team at Android Police.