This looks super useful for the many circumstances where interpolating things into strings to generate SVG paths is quite unpleasant (ie. anything much beyond "M #{x} #{y}").
The actual purpose of library is to provide with more complex shapes and graphs, while still leaving you the possibility to write a path by hand, should the need arise.
Moreover, consider that even if you stay wit the lowest level API, the data you have may be dynamic, so that it may be easier to call a function with parameters at every frame, rather than hand-concatenating string (although this use is admittedly rather limited)
SQL query builders can have the capability that they make queries composable.
Sending a string around will require you to do double and tripple check for parameters, logical combinations and what not in every step of a composable action.
Besides that, most SQL query composers assist you in isolating parameters from query, and this protects you from SQL injection.