Slight bit of pedantry: only the AppKit (1989) component of Cocoa predates the web (1990) while Foundation and Core Data (both 1994) came later. Of course, many nowadays-integral features of the web also came after its initial release, such as CGI and the <form> and <img> tags (all 1993), cookies and HTTPS (both 1994), Javascript (1995), HTTP headers, methods other than GET, non-ASCII text encodings and CSS (all 1996), AJAX (1999), and the <video> tag (2007).
Anyhow, I'm in full agreement. The web honestly isn't even that good a design for [hyper]text documents; HyperCard (as one example among many) was a great deal better, and better for graphical and multimedia content, and for applications too. Of course HyperCard wasn't cross-platform or served over a network, but it easily could've been adapted to be.