extend
implies inheritance. You don't have a precise choice over what you can inherit and what you can't.
If parent class has decided to expose some public variables etc, sub class cannot alter that.
If the parent class doesn't want to expose some fields those can be marked as private
.
Also: A class should be open for extending it but closed for changing it.