To answer the question, sum(1,2,3) doesn’t work, because, as the error message tells you, there is no sum method which takes three arguments like that (or more for that matter). What you want is to sum a generator.
sum(x for x = 1:3) is not equal to sum(1, 2, 3). The former only has one argument (the generator) and the latter has 3 arguments for which sum is not defined.
Maybe I misunderstood the question: I think the more interesting question is why does sum(k for k = 1:3) work at all, given that k for k = 1:3 on its own does not work. And that’s because (I assume) if a generator-looking thing is passed directly to a function, even without enclosing parens, it is still parsed as a generator. The method that gets called is therefore sum(g::Generator), notsum(1,2,3).
Interestingly, it also works when there are multiple function arguments:
julia> sum(abs, k for k = -1:3)
7
You can see how this is parsed similarly with tuples (with and without parens):
julia> (1,2,3,(k for k = -1:3))
(1, 2, 3, Base.Generator{UnitRange{Int64},typeof(identity)}(identity, -1:3))
julia> (1,2,3,k for k = -1:3)
(1, 2, 3, Base.Generator{UnitRange{Int64},typeof(identity)}(identity, -1:3))