In Julia, you can’t define a method with optional parameters. Your code defines a function with two methods (documentation). The method defined without the io::IO argument does not know that there are other methods which have this argument.
Again, print is only an example. It would be possible to define only the print method without io::IO, making the dependency on Base.stdout not only implicit on method level, but also on function level.