Some websites connect to localhost to communicate with local applications. For example, clicking on a Discord invite link in a web browser will open a web page that connects to a WebSocket on localhost port 6463 to communicate with the Discord desktop application to "beam" the invite to be handled by the application.
In my opinion, it is counterintuitive that such connections are allowed by default in private windows. I'm not sure if there is a setting to disable them (I did not find any by a cursory search through the settings). Personally, I would prefer if such connections were disallowed by default even in normal windows, with an option to allow them individually, like happens for pop-up windows.