See https://github.com/spring-projects/spring-boot/issues/29366#issuecomment-1152314880.

Comment From: wilkinsona

The dependency versions are documented, in part, by enumerating dependency constraints. The problem doesn't occur in 2.6.x. It began in 2.7.x somewhere between M1 and M2. It stopped being a problem again in 88128ccc97e6933de4c649d1c73e52d9dd01dc66 which is a forward merge of some changes to bring the Kotlin plugins up-to-date. I can't identify the exact commit where the problem began as a number of commits cannot be built now due to changes in snapshot dependencies. One notable change between M1 and M2 was the introduction of Kotlin code samples to the docs. Further evidence that the Kotlin plugin is the cause is that the problem doesn't occur when the documentDependencyVersions task is run without compileKotlin running as part of the same build.

My suspicion is that there was a bug in older versions of Kotlin's Gradle plugin that was causing some dependency constraint pollution, resulting in the unwanted dependency version documentation. It was fixed as a side-effect of https://github.com/spring-projects/spring-boot/issues/31388.