There are two kinds of accounts in Ethereum which share the same address space: External accounts that are controlled by public-private key pairs (i.e. humans) and contract accounts which are controlled by the code stored together with the account.
This is an extract from Solidity docs.
I didn't understand the purpose of two kinds of accounts. Why there's need to be two accounts for the same ethereum address?