Enderton Elements of Set Theory, p. 43 (1977, Academic Press), writes:
There was a reluctance to separate the concept of a function itself from the idea of a written formula defining the function.
What is the basis for the above historical claim? And at around what point did the concept of a function itself from the idea of a formula become firmly separated?
It seems interesting that what is today regarded as an elementary mistake had a strong historical basis.
Fuller quote from Enderton:

The notion of a function is generally attributed by historians to Euler, in the 18th century. This notion was of course tied in with the idea of an algebraic expression or more general formula or what might today be called a definable" function, in a sense to be specified. A more general notion of a function as an arbitrary relation, i.e. a subset of the Cartesian product of the domain and the range, is due to Dirichlet, in the 19th century. This point of view eventually won over but there has been a persistent minority view opposing it, represented for example by Kronecker, Brouwer, Poincare, and others. This minority view is associated with what is known as intuitionism or constructivism. Some of these issues are discussed in this article in Intellectica.