The problem: silently dead connections
A TCP connection is just state in memory โ no traffic is required to maintain it. After an idle period, the underlying network path may have disappeared (NAT timeout, crash, WiFi change) without either end knowing.
Without keepalives, the client holds a "zombie" connection โ thinks it's connected, but writes will fail or block indefinitely.