why the direction of an electric current is taken as opposite to the direction of an electric charge ?
This is conventionally done. In reality the electrons that form current move from the negative terminal to the positive terminal of the battery but humans have decided as a convention that the direction of current should be from positive terminal of the battery to the negative one.