Why ethereum has introduce difficulty and what is the use of difficulty in blockchain? I have seen that we can use static difficulty for blockchain . So why we not use static difficulty for public blockchain.
The difficulty varies in order to keep a constant block time.
Blocks are targeted to be 15 seconds apart. Suppose the difficulty was static--that is, the current network hashrate (5.5 TH/s) would result in a block being found every 15 seconds. Then suppose the hashrate rapidly changed (mining got more popular, more efficient, less popular, etc.) The block time would change! There are many bad effects of this, from overinflation to network instability. The simplest way is to adjust the difficulty so that the blocktime remains the same.