When for reasons of security or server side logic we do not feel comfortable running code on the client, we run it on node and setup a simple API that mirrors the vendor's API. Say for example that you are using Firebase (we use this for a chat app) but do not want to expose keys or need to run some code on messages (validations, etc). It is not ideal b/c part of the reasons of using BAAS is to avoid maintaining a back-end component. Depending on your needs, some BAAS vendors offer a "server code" solution, for example Parse's Cloud Code, that way you still avoid setting up a back-end component on your own but still run validations. etc. Parse's in particular is well setup based on events (after or before you save an object). Incidentally, they too use node.
Naturally, for this approach, you need that the BAAS vendor offers a Node SDK (most do), or maybe some other stack (PHP, Rails, etc).