It is indeed a good question. However, I think the requirement of a primary key was a bit misleading as it can also occur when the field is simply "NOT NULL" as evidenced as follows:
CREATE TABLE #mytable (
myid tinyint NOT NULL,
mychar char(1) NULL,
INSERT #mytable ( myid, mychar )
VALUES ( 1, 'A' ), ( 2 , 'B'), ( NULL, 'C' ), ( 4, 'D' ), ( NULL, 'E' ), ( 6, 'F' );
SELECT ERROR_MESSAGE() AS 'The Issue';
The key to the correct response is the reference to the result set.