Coding assessments are largely used to filter unqualified candidates and save time. You can't reasonably interview every applicant, so you set a small barrier in place and those who can cross it get the time. Coding in interviews is more about understanding your logical decisions and brain flow, whether you ask the right questions or approach problems in a reasonable way.