The problem with that approach is answering the question of when you have enough to start giving back. People get used to the money. They increase their lifestyle. They save up more to make sure they'll never have to simplify. Then they save for retirement. And their kids college. And maybe more so their kids have a a nest egg. And they gotta take care of their parents when they get old, too. But they won't fit into the wealthy lifestyle, so they save money to afford the best care providers... And then one day they find themselves at 60, retired, with the perfect life, but forgot to actually stop and give back. But they tell themselves that is OK because that was just a silly thought they had when they were 22.
Or, you can choose a percentage to give back, from the first day of your career. It won't be big to start. But it will grow with your success. And if your life takes unexpected turns, and you don't end up old and wealthy, you still gave back throughout your whole life.