without this the depgraph is incorrect, in particular we had to run emerge -1eav @world to fix some problems with certain binaries, and with bison only being repaired after pam merge ...
Whilst you're at it ... ditto for dev-tcltk/expect
Sorry, expect is for gcc.
sys-libs/pam BDEPENDs on virtual/yacc, which RDEPENDs on sys-devel/bison, so I think the dependency is correct.
Nevertheless, I can reproduce as follows.
$ emerge -pe --ignore-default-opts sys-libs/pam | grep -E 'sys-libs/pam|sys-devel/bison|virtual/yacc'
[ebuild R ] virtual/yacc-0
[ebuild R ] sys-libs/pam-1.5.1_p20210622-r1
[ebuild R ] sys-devel/bison-3.8.2
This is also the case with @system, reproduced similarly to above with the same output.