That Ending~ I expected a sad ending but I still got emotional.
Here are my theories:
Sad Theory:
Lou stopped him and tried to give the pearl via kiss but Wu Julan's strong desire for her to live and him to die stopped the pearl from entering his body which made the pearl become suspended in Lou's hands and she died as well because the pearl is outside her body (because it's too sad if she lives the rest of her life without him). @Sani had a point because she was able to breathe underwater thanks to Wu Julan so when he burst into bubbles she could have died that way as well.
Happier Theory:
Through the wishes and desire of both Wu Julan and Shen Lou, the pearl granted both of them life but Wu Julan would have a human body, meaning the end where the pearl is shining, it is actually activated because it is making a human body for Wu Julan's soul. I mean, it is a Celestial pearl so it has the power to resurrect the dead thus has the power to create life. This, however, is VERY far stretch and even I don't believe it (sadly).
It's typical that the ending is like this though because writers are not suppose to support the idea of interspecies relationships. Some let them be together but seeing as how this is Chinese and they are more conservative, it is more likely that is the reason for it to be a sad ending.