2 Answers
2

Through human history people has come with new ideas and baptize these ideas with names. "Smart contract" is a name for one idea. It is nothing but a piece of code ( in this case running in a decentralized network). There is nothing particular (fundamentally speaking) to the "smart contract", compared with any other scrypt.

A lot of people will say that the smart contracts are not smart, but on the context of a network that has only capability to send basic transactions, to have a tool that can process input data and provide an output based in some type of logic, could be considered an "smart" tool.

So you can think about the "smart contract" as a piece of code.

We can add the extra security layer so that malicious user does not
have the access to that code

But in a trust-less network, like Ethereum and bitcoin you want everyone have access to the code (so that you do not have to trust the good intentions of people), although you do not want people to temper with it. These are achieved in Ethereum already.

The difference is a developer or owner can arbitrarily change the code or the state (database) of a centralized system using centralized software.

Use a smart contract in the case that you want to data itself to rise to the level of an inarguable fact. That is, new data enters the system only through channels defined in the smart contract. Inversely, the mere existence of data/state in a smart contract can serve as proof that the process prescribed by the smart contract must have occurred.

An example is "tokens". More broadly, crypto-currencies. These are database states and processes that are not subject to arbitrary interference by authoritative actors, by design. As a proof-of-concept for blockchain and proof-of-work, I would argue Bitcoin and Ethereum have done quite well.

Ethereum does something entirely new that possibly fits into an overall architecture.

In case it helps, a blockchain can establish a set of invariants for an application and people can see that violations of those invariants will not be possible.