Selena Gomez celebrated her birthday weekend (her 19th b-day was Friday) with a concert at the Pacific Amphitheater in Costa Mesa, Calif., on Sunday, where bf Justin Bieber made a surprise appearance ... and picked a strange song to sing.

BieberGomezLunchDateSM230.jpgBieber, 17, exchanged a semi-awkward hug with Gomez as he walked on stage, then sang (a little pitch-ily ... hitting puberty, anyone?) Justin Timberlake's hit "Cry Me A River."

We can't figure it out ... why would Justin go to his girlfriend's concert to sing a song that JT sang about breaking up with his ex, Britney Spears? Especially when those two were in a teenage relationship similar to Justin and Selena's ...

But, Bieber made up for it with some sweet Tweets. He Tweeted to Selena after the show, “U did great tonight. proud of u," and also wrote, "Had a #greatnight and surprised the people. felt good to be on stage. nothing is changing that. ... ”

Again, we're a little confused ... why would anything change that, JB?

See what else Justin recently Tweeted about Selena after the jump ...