Why rotations with two angles in $3D$ do not form a group? Let us use any parametrization of  $3D$ rotations with three angles (e.g. Euler angles or yaw-pitch-roll), and throw away one of the angles (just assign it a fixed value).
Will the remaining set of transformation form a group? If yes — which? If no — why?
Follow up: the same question on more general Lie groups. What typically happens if we fix some of the parameters? In which cases does this result in getting a new group? If it doesn't — why?
CLARIFICATION
Just in case ⁠— I'm NOT asking why the new set of transformations is not $SO(3)$ anymore, that's pretty obvious. The question is: which group axioms are no longer satisfied? We clearly have a neutral element, and for each transformation there is an inverse. So what's wrong then?
 A: There's a mapping $K$ from $S^1 \times S^1 \times S^1$ to $SO(3)$, sending a pitch-yaw-roll triple to the corresponding rotation matrix. [There are actually many such mappings, depending on the order of roll, pitch, and yaw, but that doesn't matter for this answer, so I'm just going to call the mapping $K$.
OP seems initially to be asking "Can we look at
$$
H = \{ K(\alpha, \beta, 0) \mid \alpha, \beta \in S^1 \}
$$
and see whether it's a group?" OP observes that $H \ne SO(3)$, that

*

*$I \in H$, and that


*if $U = K(\alpha, \beta, 0) \in H$, then there's a matrix $V \in H$ such that $VU = I$,
so that $H$ appears to be a subgroup.
I personally believe that item 2 is false, but that's not really the main point. As @DougM observes in another answer, we can multiply two elements of $H$ to get a new element that's not in $H$, hence that $H$ is not closed under multipication.
OP seems to then shift the rules a bit, and ask about $P = K(\pi/2, 0, 0)$ and $R = K(0, \pi/2, 0)$ (I might have the numerical arguments or their order wrong, but that will prove to be irrelevant) and wonders about the subgroup $L$ generated by $P$ and $R$. That subgroup is, indeed, a subgroup (no surprise there!). But not every element of that subgroup is in $H$, so it doesn't really consist of things "with the third parameter held to some constant".
One could go even further, and write $P(\alpha) = K(\alpha, 0 , 0)$ and $R(\beta) = K(0, \beta, 0)$, and look at the group generated by the image of the functions $P$ and $R$, i.e., all possible sequences of pitches and rolls through any possible angles. That turns out, by a small generalization of @DougM's answer, to be all of $SO(3)$.
Short summary: if you parameterize a group $G$ by another group $H$, but the parameterization $K$ is not a homomorphism, then you should not generally expect the images of subgroups of $H$ under the map $K$ to be interesting.
A: Let consider some 90 degree rotations.
We have two rotation matrices that generate our group.
$P=\pmatrix{&1&\\-1&&\\&&1}$ and $R=\pmatrix{1&&\\&&1\\&-1&}$
Traditionally our third rotation matrix
$Y=\pmatrix{&&1\\&1&\\-1&&}$ has been left out.
But $PRP^{-1} = Y$
Two rotations will generate the 3rd rotation and hence $SO_3$
