It is considered impolite and inconsiderate to not say goodbye before leaving, as it can leave the other person feeling ignored and dismissed.  Saying goodbye is a polite way to show respect and appreciation for the time spent together.