You right that stronger intermolecular force decreases pressure such that it deviate from the ideal gas law. therefore, it does not behavior ideally, and ideal gas law does not perfectly describe real gas perfectly. However, we can make adjustment to counter the effect of finite volume of gas molecules and intermolecular forces, such that ideal gas behavior is observed after these adjustments. This is where van del waal equation comes into play. You know ideal gas law is pv=nrt. How can we make adjustment such that ideal gas behavior is once followed. Since you know the observed pressure is reduced due to intermolecular force, we have to add the a(n/v)^2 back to the observed pressure. For ideal gas law, the gas molecules are assumed to volumeless, so we have to discount the volume of gas molecules (nb)from the total volume of the container. After these adjustment, we have (p+a(n/v)^2)(v-nb)=nrt