Using data with hourly resolution obtained in the near-Earth heliosphere in 1965-2014, we have calculated statistical characteristics of the angles describing the direction of the interplanetary magnetic field (IMF): root-mean-square deviations of azimuth and elevation angles, asymmetries of their distributions, and coefficient of correlation of the angles. It has been shown that the above characteristics vary in the course of solar cycle, and some of them change their signs when the solar polar magnetic field reverses. The results obtained from the experimental data analysis are compared with a model describing transport of large-scale disturbances of IMF lines by the inhomogeneous solar wind. The comparison shows that the variations in the IMF angular distribution in the course of solar cycle probably occur due to the appearance of the large-scale latitudinal gradient of solar wind velocity during solar minima. In addition, the IMF angular distribution has been found out to be substantially affected by the longitudinal velocity gradient in trailing parts of high-speed streams and short-term local-scale variations in velocity gradients.