Two MySQL query results are different, but shouldn't be
Here's a simpler way of looking at your queries

select * 
from A
where A.did = 1988

-- returns record where card = 2157


and

select * 
from B join A on A.card = B.id
where B.userid = 2157 


Since you want the record where a.card = 2157 and a.card = b.id then either


Change your where statement so it is looking for b.id = 2157 or a.card = 2157
Or change your join so you're joining a.card = b.userid