A Standard ML structure is akin to an algebra. Its signature describes an entire class of algebras of similar shape.
A Standard ML functor is a map from a class of algebras to another class of algebras. An analogy is, for instance, with the functors $F : {\bf Mon} \to {\bf Grp}$, which adds an inverse operation to monoids, or $F : {\bf Ab} \to {\bf Rng}$ which adds a multiplicative monoid to abelian groups to make rings.
Most of these ideas were worked out in series of papers by Burstall and Goguen in designing a specification language called CLEAR (References c5 and c6 on the DBLP page.) David MacQueen was working jointly with Burstall and Sannella at that time, and was intimately familiar with the issues. The Standard ML module system is based on these ideas.
What most people would wonder is, what about morphisms? Category theoretic functors have an object part and a morphism part. Do Standard ML functors have the same? The answer is YES and NO.
- The YES part of the answer applies if the structures are first-order. Then, there are homomorphisms between different structures of the same signature, and Standard ML functors automatically map them to homomorphisms of the result signature.
- The NO part of the answer applies when the structures have higher-order operations.
Does this mean that Standard ML is deviating from category theory? I don't think so. I rather think that Standard ML is doing the right thing, and category theory is yet to catch up. Category theory doesn't yet know how to deal with higher-order functions. Some day, it will.