Yes I know you must have noticed the irony in this situation but the truth is that sometimes being glad is not all about smiling and being happy, sometimes true happiness is derived from reminiscing all your failures acknowledging them and finally realising that you have overcome them. This feeling is almost so overwhelming but it leaves you so emotional and the only way for you to express to happiness is to actually shed tears.
However this tears doesn't come from the fact that you are sad anymore it comes from the fact that psychologically and mentally you know that you have been free from a situation and remembering all the humiliations and all the trying times of a particular situation which were put through it's also make people cry when they finally overcome such feeling.
So the truth is that happiness comes when someone is free from sadness but sometimes this freedom brings an emotional satisfaction, human beings as an evergreen memory and this memories are sometimes the reason why they want to continue fighting for what they want it could be from the fact that you have been overwritten and people say that you cannot do a particular thing but having the feeling that you have proven them wrong and actually surpassed their limitation for your life is the reason why you would shed tears confirming that you have actually proving people wrong and this is always a brilliant feeling.
So crying when you are happy is an indication of incomparable fulfillment and when people become too emotional from being happy it makes them reminisce how far they have come and how far they have suffered to get to that place they are now and this burst of emotion can bring tears to the eyes