I) Perhaps an example is in order: Consider a curtain ring on a curtain rod.
The curtain ring$^1$ is constrained to move along the $x$-axis. The system has one degree of freedom. The generalized coordinate is $q\equiv x$. Note in particular that the generalized coordinate $q$ is unconstrained, while the position ${\bf r}$ is confined to the $x$-axis. The virtual displacements $\delta {\bf r}=\vec{\imath}\delta q$ are therefore also along the $x$-axis.
The applied$^2$ force
$$\tag{1} {\bf F}^{(a)}~=~-mg\vec{\jmath} ~\neq~ 0$$
on the ring is gravity in the $y$-direction, which is perpendicular to the $x$-direction. The principle of virtual work is therefore satisfied
$$\tag{2} {\bf F}^{(a)}\cdot \delta {\bf r} ~=~0.$$
II) Conversely, since we are not free to vary $\delta {\bf r}$ arbitrarily in eq. (2), we cannot deduce that ${\bf F}^{(a)}$ is zero. In components the principle of virtual work (2) becomes
$$\tag{3} F_x^{(a)} \delta q ~=~0$$
Since the generalized coordinate $q$ is unconstrained, we deduce deduce from (3) that
$$\tag{4} F_x^{(a)}~=~0. $$
Note in particular that the principle of virtual work (1) says nothing about the other force components $F_y^{(a)}$ and $F_z^{(a)}$. In other words, we can only deduce from (2) that
$$\tag{5} {\bf F}^{(a)} \perp \delta {\bf r},$$
i.e. that ${\bf F}^{(a)}$ is perpendicular to the $x$-direction.
III) When Goldstein below eq. (1.43) says
In order to equate the coefficients to zero, we must transform the principle into a form involving the virtual displacements of the $q_i$, which are independent,
he means that (after the transformation) we can equate the new coefficients to zero. He doesn't mean that we can equate the old coefficients to zero.
--
$^1$ Let us treat the ring as a point particle and ignore friction for simplicity.
$^2$ For the definition of applied force, see e.g. my Phys.SE answer here and links therein. The constraint force on the ring is the normal force from the rod, which ensures that the ring does not fall down.