Children learn by example. There are exceptions of course, and if you believe in exceptions rather than rules then go spend all your income in lottery tickets.
Of course they learn by example, but show me the perfect parent? Do you want to doom your kids to all of your own failings? Kids also learn by seeing the flaws in their parents and having the parent explain how they got there and how not to repeat the mistakes.
He who is without sin, let him cast the first stone.