Approval and obtaining an EAD has nothing to do with the approval of I-140.
You get an EAD because you filed I-140 and I-485(and ofcourse apply for an EAD).If the preliminary examination of these documents is satisfactory, that is, the applicant is eligible to file them AND there is nothing against the applicant in these documents which would otherwise make him ineligible,then the EAD is cleared.Again,note that it is just a preliminary review,not a final one.It does not mean that the I-140 has been or will be approved.
Obtaining an EAD does not guarantee the approval of I-140.