I believe the process which generates the Jenkins docker images is automated. That automation does not require updating the JENKINS_VERSION default value in the Dockerfile. By avoiding updates of the JENKINS_VERSION in the Dockerfile of the repository, the project does not waste commits on changes to default values.
The intent is that your Dockerfile starts with 'FROM jenkins/jenkins:2.107.2-slim' or with 'FROM
jenkins/
jenkins:2.107.2-alpine' and then adds the specific items which it needs.
It is not the intent that your Dockerfile starts with 'FROM openjdk:8-jdk'.
I believe the concept is that your Dockerfile does not see "inside" the Dockerfile which is used by the Jenkins image creation.
Mark Waite