Because some databases have a significant usage among web developers and web developers have a significant expertise in javascript.
I am not against databases with scripting capabilities and I do not think javascript/front end developers are per se naive, but I've far to often seen the naive assumption that just because its javascript, everyone can handle it.
(This is only partially sarcastic as there were a few RDBMS + HTML template products that mercifully died).