Magnetic flux through a surface is maximum when the direction of the magnetic field is in the same direction as the normal vector of the surface. In other words, the magnetic flux is maximum when the magnetic field is perpendicular to the surface area. That's why φ=BAcosθ, where θ is the angle between the direction of the magnetic field and the normal vector of the surface area. When the magnetic field is exactly the same direction as the normal vector (aka the magnetic field is perpendicular to the surface), θ=0 and cosθ = 1, its maximum value. The closer θ is to 90 degrees (ie. the more parallel the direction of the magnetic field is to the surface area, or the less parallel the magnetic field is to the surfaces normal vector), the smaller cosθ is, and thus flux will decrease accordingly.