Does Chrome not jump to anchors when coming from a different site (your link here)? If I paste it in a manually opened tab it works.

They especially put a copy link button above the section to get a nice link. Did the course creator really put this link in the course material?
What purpose do the additional keywords have? For search engines?

Here's the page that has that link. It's near the beginning, with text TopAppBar. This link is just as long:

https://developer.android.com/codelabs/basic-android-kotlin-compose-material-theming?continue=https%3A%2F%2Fdeveloper.android.com%2Fcourses%2Fpathways%2Fandroid-basics-compose-unit-3-pathway-3%23codelab-https%3A%2F%2Fdeveloper.android.com%2Fcodelabs%2Fbasic-android-kotlin-compose-material-theming#6

I suspect they use some kind of redirection system for handling links so that they stay up to date. Doing that manually would be a nightmare. Maybe that's why they're so long.