Because the problems networking solves, physical signaling, addressing, routing, reliable delivery, encryption, message format, are too varied to handle as one monolith, so they're separated into layers that each do one job and interact only with the layers directly above and below through defined interfaces. The benefit is modularity and independent evolution: because each layer is a contract, you can replace the link layer (swap Ethernet for WiFi) without changing IP or TCP, improve TCP's congestion control without touching applications, or run the same HTTP over completely different physical media. It also enables interoperability, different vendors implement the same layer to the same spec and interwork, and divides the engineering so a router team thinks about IP while a NIC team thinks about the link. The cost is some overhead (each layer adds a header) and occasional inefficiency from strict separation, but the manageability and flexibility are worth it, which is why every real network stack is layered.
Networking & IoT · Interview question
Why is networking organized into layers at all?
A strong answer
What a weak answer sounds like
You know the answer. Do you know what gets you dinged?
Pro breaks down the answer most candidates actually give to this question — and the specific reason an interviewer marks it down. It’s the difference between sounding correct and sounding senior, on all 472 questions.
From the lesson
OSI vs TCP/IP Model
Why networking is split into stacked layers, how the 7-layer OSI reference maps onto the 4-layer TCP/IP model the internet actually runs on, and how encapsulation wraps your data.