Because it is a static field  `HttpClient.Factory.createDefault();` in called on instantiating the HttpCommandExecutor.
If you are using on of the Constructors with `HttpClient.Factory httpClientFactory)` as parameter it is no neccesary to have the `HttpClient.Factory.createDefault();` And you will stock on exceptions inside this `HttpClient.Factory.createDefault();`

https://github.com/SeleniumHQ/selenium/blob/26c65c7a5c1be4558311e91802ce35942cfacee8/java/client/src/org/openqa/selenium/remote/HttpCommandExecutor.java#L48
package org.openqa.selenium.remote;
import org.openqa.selenium.NoSuchSessionException;
import org.openqa.selenium.SessionNotCreatedException;
import org.openqa.selenium.UnsupportedCommandException;
import org.openqa.selenium.WebDriverException;
import org.openqa.selenium.internal.Require;
import org.openqa.selenium.logging.LocalLogs;
import org.openqa.selenium.logging.LogEntry;
import org.openqa.selenium.logging.LogType;
import org.openqa.selenium.logging.NeedsLocalLogs;
import org.openqa.selenium.logging.profiler.HttpProfilerLogEntry;
import org.openqa.selenium.remote.http.ClientConfig;
import org.openqa.selenium.remote.http.HttpClient;
import org.openqa.selenium.remote.http.HttpRequest;
import org.openqa.selenium.remote.http.HttpResponse;
import java.io.IOException;
import java.net.URL;
import java.util.Map;
import static java.util.Collections.emptyMap;
import static org.openqa.selenium.json.Json.JSON_UTF_8;
import static org.openqa.selenium.remote.DriverCommand.GET_ALL_SESSIONS;
import static org.openqa.selenium.remote.DriverCommand.NEW_SESSION;
import static org.openqa.selenium.remote.DriverCommand.QUIT;
import static org.openqa.selenium.remote.HttpSessionId.getSessionId;
public class HttpCommandExecutor implements CommandExecutor, NeedsLocalLogs {