SQL Server - MERGE join condition with NULLable Columns
Mark Sinkinson nailed it in the comments:


  This is standard behaviour. NULL does not equal NULL


What you can do is adjust your predicate from this:

WHERE Destination.ColumnA = Source.ColumnA
    AND ...  -- other column comparisons


to the following:

WHERE ((Destination.ColumnA = Source.ColumnA)
       OR (Destination.ColumnA IS NULL AND Source.ColumnA IS NULL))
   AND ...  -- other column comparisons


This will provide a workaround that effectively equates a NULL in one column to a NULL in another.

So to work that into your Merge, it would be as follows:

MERGE INTO xx.dbo.acc_s AS Target 
 USING yy.dbo.acc_s AS Source 
 ON (Target.acc_id= Source.acc_id 
     AND Target.s_id= Source.s_id 
     AND (a_code= Source.a_code 
          OR (a_code IS NULL AND Source.a_code IS NULL)
         )
    ) 
WHEN NOT matched BY Target THEN
INSERT (acc_id,s_id,a_code)
VALUES (Source.acc_id,Source.s_id,Source.a_code);