Two key variables contribute to journal impact factor (JIF). The first is the number of authors. It is well established that a paper with 100 authors will be cited more often than a paper of a single author. In this context, JIF may simply be considered as an index of average number of authors per paper. As a paper by 100 authors is not necessarily better than a paper by a single author, JIF is hardly meaningful.
Another relevant variable is the funding behind the research. A field with 1000 billion dollars of funding will have more researchers citing each other than a field with only one million dollars of funding. It make no sense to compare a journal on oncology with a specific zoology journal such as Journal of Molluscan Studies
JIF should be adjusted for number of authors per paper and perhaps should also be adjusted by funding, although the latter is operationally more difficult.