"Turn on Wi-Fi automatically" will be enabled by default on all Android 9.0 Pie running phones
Pixel 2 XL on Oreo has the Turn on Wi-Fi automatically feature
Not all Android phones running Oreo have the feature since it is up to each manufacturer to decide whether or not to enable it. If your handset does have the "Turn on Wi-Fi automatically" feature, you can turn it on by going to Settings > Network & Internet > Wi-Fi > Wi-Fi Preferences > "Turn on Wi-Fi automatically." Wi-Fi scanning will need to be enabled, which can be set at Settings > Location > Scanning.
Things are going to change when phones begin launching with Android 9.0, or start receiving the update to the latest Android build. A change in code found on a commit on the AOSP website reveals that "Turn on Wi-Fi automatically" will be enabled by default on Android 9.0. And while Google can be questioned about why it takes double the number of steps to activate the split-screen on Pie, it is still working on ways to improve the Android user experience and extend battery life, even if it is just a little bit at a time.
Commit code from AOSP reveals that the Turn on Wi-Fi automatically feature will be enabled by default on Android 9.0
source: XDA
Things that are NOT allowed: