Why does plot_ly copy the whole data argument?

I notice that

foo <- data.frame(x = 1:10, y = 1:10, z = 1:10)
## this works
plot_ly(foo, x = ~x, y = ~y, z = ~z, type = "scatter3d")

## this fails -- why does plot_ly care about columns not used in the plot?
foo$fm <- matrix(1:10, nrow = 10, ncol = 10)
p <- plot_ly(foo, x = ~x, y = ~y, z = ~z, type = "scatter3d")

fails with Error: Column fm must be a 1d atomic vector or a list. Why does plot_ly care about zm? I don’t use it in this plot.