Rules are not evaluated prior to placing emails in the junk folder. There are 2 unwanted side-effects due to this behavior.
(1) an applicable user rule(s) that would automatically delete the email is not run, forcing the user to resort to manual deletion.
(2) an applicable user rule(s) that would move the email to a local folder is not run, forcing the user the move it manually if he/she is lucky enough to notice it in the junk folder.
A nice way to handle it in the code (I’m a long time career programmer) would be to allow the rules to run for the junk-folder-destined email, and if none of the rules applied, then move it to the junk folder.
That would be a great feature for people using a lot of auto-delete filters, and/or local folder filters, and as email standards are tightened now and then (thanks to spammers and hackers), new unexpected email behaviors can arise, and this feature could be handy in those cases also.