Why are mapping reductions from incomputable Languages OK? For example, many reductions from $A_{TM}$ will often have the lines:

Simulate M on w:
    if M accepts 
       ...
    else


But: a reduction is a computable function, right? So why are we allowed to say "if M accepts"?
Also, I can take the same logic and reduce $A_{TM}$ to a deciable language:
Let L be the empty language. Clearly L is decidable.

Given $(M,w)$:

 Output output:
      If M accepts w
            output = '0'
      else
            output = $\emptyset$


Obviously I'm wrong here. But why?
Thanks in advance.
There are two options:


Either the pseudocode means "run $A_{TM}$ on the pair $M,w$" when it says "Simulate $M$ on $w$";
or it really means to simulate $M$ on $w$, and if it ever stops then do something; there is no "else" clause in that case.