Honestly I don't even understand why so many docker images prefer to build software from sources, rather than just installing them from debian repositories.
Because Debian uses older relases and a lot of custom patches. One example: Nodejs still doesn't have Typescript support in the Debian packages.
Distribution packages vs. official build from source has both pros and cons.