As each block of server-side code is reached, it is executed immediately by the server. So, you can see that the code is both procedural and object-oriented. The procedural part is the execution of the scripting sequentially, along with any loops which occur. Because half of the participants in an application, that is, the user, is human, and prone to error, unlike our trusty electronic companions. A relatively simple application may contain scads of code to prevent humans from doing something stupid, or to react appropriately when they do, which they do.
Humans do the darndest things .
Don't ever put anything past them. Well, it's one thing to format your SQL Statement so that the proper delimiters appear around the appropriate data types. But what if the user adds a dollar sign, or some other unexpected text, rather than simply numbers and the period. You have to get creative, and imagine every stupid or inappropriate thing that a user can do, and account for it with appropriate code. You also have to account for things happening on the server, which don't fit well into your plan.