multi-column FKs with NULL values
This behavior (allowing NULL values in FK columns) conforms to the SQL standard. The manual:


  The CREATE TABLE command conforms to the SQL standard, with exceptions listed below.


And there is no exception listed for FK constraints.

To disallow that some columns of a multi-column FK are NULL, use MATCH FULL instead of the default MATCH SIMPLE behavior. The manual:


  MATCH FULL will not allow one column of a multicolumn foreign key to
  be null unless all foreign key columns are null; if they are all null,
  the row is not required to have a match in the referenced table.


Or just define some or all column NOT NULL. More here (as @ypercube commented):


MATCH FULL vs MATCH SIMPLE in foreign key constraints