The "vanilla" y=cos(x) function oscillates between -1 and +1. In the given function, only a multiplication with 3 is applied. The min and max scale accordingly, so the maximum becomes +3 and the minimum -3.
The x interval of [-2π, 2π] ensures that all y values are enclosed; the cosine makes two full sweeps.