UNION
is a set operator and involves checking for "duplicate rows". The specs define duplicate rows as "not being distinct". An excerpt from SQL-92 specs:
Two values are said to be not distinct if either: both are the null
value, or they compare equal according to Subclause 8.2, "<comparison
predicate>". Otherwise they are distinct. Two rows (or partial rows)
are distinct if at least one of their pairs of respective values is
distinct. Otherwise they are not distinct. The result of evaluating
whether or not two values or two rows are distinct is never unknown.
(emphasis mine). So, in this example:
select null
union all
select null
the two rows are considered duplicates of each other because the null values in first column are considered not distinct... i.e. same. And by definition UNION
returns only one row from a set of duplicate rows.