That’s the problem. Even doing the right thing can turn into a prideful issue unpleasing to God. Jesus saw a lot of that with the Pharisees.
Indeed, that’s the Jews’ stumbling block: pridefully relying on saving themselves, rather than humbly letting God save them.