Potential Postdoc advisor giving exams (assignment) as part of hiring process
It is highly unusual. As you note, the PI has plenty of "standard" information (publications, recommendation letter, CV, etc.) that can be used to assess your potential as a collaborator and independent scientist. This is what most PIs will use in the hiring process. Some will ask you to give a seminar or do an interview by phone, video, or in person.

How the PI evaluates you as a candidate will reflect how the PI evaluates you once you are an advisee. This is especially true if they ask you to do something unusual, which is certainly the case here.

You are being told that the work you have done in the past, the good credit that you have earned with your previous advisor, your attendance and interaction at seminars... these are unimportant factors compared to whatever skills this "exam" is testing. It sounds like you do not agree with that attitude. That is reasonable, and if true, I suggest that you and this advisor may not be a good match.