If you are here to find an answer, then you should probably start with one.
Why is this important?
Why you should use server-side logic versus client-side
There are also some scripts that has to be executed server-side. Let's assume that you have multiple embedded forms for incoming leads. Those leads come from multiple different web pages. Say you want to run some script every time you receive a new lead. To do this on the client-side you would need to add this logic in all embedded forms. While you are using server-side code, you can just create an On save event handler and write this code once at one place.
How does it work?
The best thing about all it, is that it just works. An internet access and a web browser are all you need to use it, anytime, from anywhere, from any device.