As you know, SqlClient implements native access to SQL Server on top of SQL’s protocol layer. To establish communication between client and server both need to use the same protocol.
By default, SqlClient attempts to make the connection using the following protocol order[1]:
1. Shared Memory
2. TCP/IP
3. Named Pipes
Starting from the first one, it moves to the next, failure after failure until reaching a valid one. So, if only Named Pipes is enabled on the server, the client goes through a failed Shared Memory and a failed TCP/IP (with their timeouts) before reaching the right one.
Read more: ADO.NET team blog