Why does include() call PublicStream::stream_set_option()? I am including a PHP file that in stored in the public:// directory.
(Yes, I know that's generally a bad thing, but there are reasons, and this is done on a local development server.)
I get this warning.

User warning: stream_set_option() not supported for local file based stream wrappers in Drupal\Core\StreamWrapper\LocalStream-&gt;stream_set_option() (line 356 of core/lib/Drupal/Core/StreamWrapper/LocalStream.php).

I don't understand what's going on.
Why is include() calling PublicStream::stream_set_option()?
It happens with PHP 7.4, where one of the backward incompatible changes is the following one.

When using include/require on a stream, streamWrapper::stream_set_option() will be invoked with the STREAM_OPTION_READ_BUFFER option. Custom stream wrapper implementations may need to implement the streamWrapper::stream_set_option() method to avoid a warning (always returning FALSE is a sufficient implementation).

Even with the latest code committed in Drupal 9, LocalStream::stream_set_option() triggers the user error you are seeing.
public function stream_set_option($option, $arg1, $arg2) {
  trigger_error('stream_set_option() not supported for local file based stream wrappers', E_USER_WARNING);
  return FALSE;
}