With more modern databases, there are server-side resource constraints per bucket (query, connection, etc..). One of the resources is execution time that can be constrained. Sometimes it can even accept a hint, from the client, regarding the maximum runtime to enforce server-side.
I always understood timeout is a resiliency measure implemented by the engineer - doesn’t matter whether it is client or server side. Also, client & server/service concepts are relative to what we are talking about.
https://www.postgresql.org/docs/current/runtime-config-clien...