Even if it is wrong to entirely sacrifice oneself for others, this doesn't support the other extreme of ethical egoism. Ethical egoism provides the best explanation of our actual moral practices and ordinary judgments about what is right and wrong. On this approach ethical egoism is not a challenge to commonsense morality, but an attempted explanation and systematization of it. It's thus to our own advantage to avoid harming them and so on for other seemingly altruistic rules. Second, ethical egoism doesn't actually square with moral practice very well.
Ethical egoism provides the best motivation for our actual moral practices.
Because it's in our own self-interest. The reason we should obey the rule against harming others is that that rule protects us too. And now the objection is that ethical egoism is an arbitrary moral doctrine. There is no general difference between oneself and others to justify this differential treatment. So ethical egoism is unacceptably arbitrary.