I don't know about how it became popular, but personally I find the prior to be easier to parse quickly without having to learn what a handful of decorators do as well as cutting down on the amount of boilerplate required to write an HTTP handler.
Even .NET is moving towards your first example by providing minimal APIs that allow simple binding of a route to a handler function.
Even .NET is moving towards your first example by providing minimal APIs that allow simple binding of a route to a handler function.