Reason behind why a certain code is executed first than the other and im not using any ajax calls

So basically i have a application that is connected to Firebase database and im having a hard time unto why a certain code is executed first than the other. below is the structure of my code:

    function loadTables(){
refReview.on("value", function(snap){
    var data = snap.val();
    var file11 = "";


    for(var key in data){
        console.log("keys retrieved",data[key].revieweeID);

        var idOfReviewee = data[key].revieweeID;


        var promise = getData(idOfReviewee);
        promise.then(function(returnedFnLn){
            console.log(returnedFnLn);
        });
        console.log("yeah");
    }//end of for loop

});

}

 function getData(idRev){
return new Promise (function(resolve,reject){
                getDataToUsers = firebase.database().ref("users").child(idRev);
        getDataToUsers.once("value",function(snap){ 
            var fnLn =snap.val();
            var first = fnLn.firstname;
            var second = fnLn.lastname;
            forPromiseFnLn = first.concat(second);

            resolve(forPromiseFnLn);
        });


});

}

referring to the console.log in the code, the structure of the console must be

::::::
keys retrieved: 
(firstname and lastname retrieved)
yeah

but instead outputs a structure like this

::::::::
keys retrieved 
yeah
(firstname and lastname retrieved)