This is a different usage of "as well." Here, the word "well" means "good." If something is "just as well," it is "just as good," or equally good. If you say that something is "just as well," it usually means that it isn't what you wanted to happen, but you think it is probably just as good as what you did want. For example:
A: "Do you want to see a movie with me tonight?"
B: "Sorry, I have to work tonight, so I can't."
A: "Oh. That's okay, I have a lot of homework to do, so it's probably just as well."
(meaning: it's probably good that you're busy, actually, because otherwise, I would go to a movie instead of doing my homework)
"Might as well" and "may as well" are similar to this. "We might as well just leave" means it's probably good to leave, instead of staying. "You may as well buy it, since it's on sale" means that because it's on sale, it's probably good to buy it. The literal meaning is that it's /equally/ good (just "as good") to do it or not do it, which sounds more friendly/casual than saying that we definitely "should" do it.
"Since you don't like your job, you should quit." (sounds like the person is telling you what to do)
"You might as well quit your job, since you don't like it." (sounds more like a casual suggestion)