Mac Lane and Eilenberg's motivations for category theory
Eilenberg and MacLane published "General theory of equivalences" in 1945. The initial idea of the two mathematicians was to provide an autonomous framework for the concept of natural transformation, which they came across while working on analogies between group extensions and homology groups and whose generality, pervasiveness and usefulness became soon clear to both of them. For this reason, their initial project turned into that one of devising an axiomatic system in which natural transformations would arise naturally from a stable and self-consistent theoretic grounding (the subject later called category theory, of course). After they realized that a natural transformation is nothing but a family of maps providing a sort of "deformation" between two "collections of interrelated entities" within a given structure, they introduced what are now called functors, which played the role of the "deformation" of a natural transformation. The collection of interrelated entities" was soon formalized through the definition of category. (by the way, notice anyway that MacLane and Eilenberg explicitly avoided using a set-theoretical terminology and notation!!!) You can find more information on papers like "The history of categorical logic: 1963-1977" by Marquis and Reyes (which is extremely recent, by the way), and of course in Kroemer's book.