For the same reason a modern CPU has capabilities far beyond what's exposed through Javascript or Ruby: it's easier to build a simple general purpose device and then implement any API through a software layer than to make hardware implementation of every complex API.