This freecodecamp article might help. Essentially, the default case is the catch all case since there is always a possibility that every eventuality may not have been considered - which means that it might prevent a crash.
There is nothing for the server to serve on the /contact route.
If you want components to be conditionally rendered you do not want URL navigation. Add a click handler to the links and make sure you preventDefault. Then create a state variable that is set to the event.target.pathname by the handler.
If you do want actual routing I would suggest you install a router like react-router. Check the Netlify docs for SPA redirects on 404 (or use the hashrouter from react-router).
If you really do want to implement actual routing by yourself I would look at some examples. Here is a random article (didn’t really read it)