Alkene production by dehydrohalogenation
The fundamental reason lies in the difference between the action of a base and a nucleophile.

There are two types of mechanism through which substitution proceeds:-


SN1 Reaction - Here, the substrate undergoes hetrolytic cleavage to produce a carbocation and an anion. The thing which solvents do is to stabilise the newly formed ions. A Polar solvent(One case-Water) stabilises the intermediate stage more than the reactant stage because the reactant state forms weak dipole-dipole bonds with the solvent where as the intermediate stage has full fledged proper charges on then to interact with the solvent and forms strong ionic bonds.
SN2 Reaction - Same thing but because of the changes in mechanism type of solvent changes but the essence is same.


This tells us that the solvent is crucial to generate a strong electric field which can help the reaction proceed further by ionising the substrate whereas a base is not so capable of handling this type of work

In elimination reaction, the solvent generates a strong electric field around the substrate which in turn helps in the cleavage of C-H bond so that it can stabilise the carbocation(in E1 mechanism) or help the transition state to get rid of the leaving group(In E2 mechanism).

Basic action is a matter of equilibrium which shows how readily it can accept protons and go forward whereas nucleophilicity is all about the rate how fast it can go which in turn shoes us how eager it is to form bond or get rid of its negative charge.