Although you'd probably instead have an REST endpoint contain the method name and the entire JSON body is the parameters. But the difference is minor. There's no reason this allows arbitrary execution than anything else.
Methods directly exposed to the web is how 99% of all MVC frameworks work.
Methods directly exposed to the web is how 99% of all MVC frameworks work.