Goodbyes are very painful. There is always a finality in its content even if it is not a total goodbye. There is a big difference between a "goodbye for now, see you tomorrow" and one that will take years before being reunited once again with the person. Obviously, there is a big difference between a temporary goodbye and a final one which is a goodbye to someone being lowered to the ground. Just the same, both can be very painful in their own special way.
It is painful because you have already grown accustomed to the person's presence, listened to his/her voice practically everyday, talked and shared ideas with, shown and seen all swing moods, probably even quarreled with him or her from time to time. And in spite of all these, you are still together. Friends are like this. Sometimes, your relationship with your friends is even much deeper than what you have with your own siblings. This is especially true when you spend more time with them than your own family.
Probably the main reason why it is painful is because once someone leaves, that will mean a cessation of what you have got going for you. You are in a comfort zone and suddenly it comes to a halt. If you are like me who has stayed in one work place for so long, you would have experienced being left all the time. You have seen people come and go. You are left in mid-air only to start all over again with a new set of friends. That is what is painful with goodbyes. No matter how long the absence will be, there is a stop to the relationship and you both have to move on, find new friends from among your old and new acquaintances not knowing what the outcome will be. But once you are settled down, life goes on and your once close friend is only good for reunions trying to catch up on old times but it will never be the same again.
Of course a marriage is different. And so is your immediate family. There is a commitment you have sworn to protect, trust and obey. Friendship is not as rigid as this is. You become friends, bond and become together without any ceremonies at all. You just happen to be two or more people who happened to enjoy each others' company and it clicked! And so when its time to say goodbye, it will be painful because it will be forever.