Server side code allows the implementation to be hidden from the client. That "hidden" implementation might be a database access or some other resource you don't want directly exposed to the public.
Where does the source code reside? PHP for example the code is resident on the server side of the HTML interface. JavaScript the code is transferred to the client as part of the HTML for execution.
Server side code allows the implementation to be hidden from the client. That "hidden" implementation might be a database access or some other resource you don't want directly exposed to the public.