Why are Newton's laws valid only for rigid bodies? As far as I know, Newton originally wrote the first and second laws for a particle. Under the condition that a collection of particles is rigid, we can write Newton's second law for a body as $F_{net}=Ma_{cm}$ where $a_{cm}$ is the acceleration of the center of mass.
This is confirmed by Wikipedia (look under overview section). But I don't see where the condition for the body being rigid is used in obtaining the above equation from Newton's laws for a particle.
Let there be a rigid body where each particle in the body experiences a net force of $dF$. According to Newton's laws, $$dF=dM\ a\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ (1)$$
where $dM$ is a differential mass.
Now, $$\int_{}^{}dF=\int_{}^{}dM\ a$$ where the integral is for all masses. By definition of center of mass, $$r_{cm,anypoint}=\frac{m_{1}r_{1}+m_{2}r_{2}+m_{3}r_{3}+.....m_{n}r_{n}}{m_{1}+m_{2}+m_{3}+m_{4}+......m_{n}}$$
double differentiating with respect to time on bot sides, we get
$$a_{cm,anypoint}=\frac{m_{1}a_{1}+m_{2}a_{2}+m_{3}a_{3}+.....m_{n}a_{n}}{m_{1}+m_{2}+m_{3}+m_{4}+......m_{n}}$$
for a collection of differential masses, this can be written as $$(\int_{}^{}dM\ a)=(\int_{}^{}dM)\ a_{cm}$$ this means that $(1)$ cna now be written as $$F_{net}=(\int_{}^{}dM)\ a_{cm}$$ and so $$F_{net}=M\ a_{cm}$$
The definition of center of mass is applicable for all bodies, rigid and nonrigid. Where have I used the condition that the body has to be rigid?
 A: The body does not have to be rigid.  Newton's laws work for all bodies.  If you are interested only in the motion of the centre of mass of some object, then it is the case that
$$\vec{F}_\text{net} = M\vec{a}_\text{cm}$$
Where $\vec{F}_\text{net}$ is the net applied force and $\vec{a}_\text{cm}$ is the acceleration of the centre of mass.
The problem is that for non-rigid bodies this is only a tiny part of what is interesting about the system: you are almost certainly interested in what happens to the shape of the thing or the distribution of mass in it or any number of other interesting things.  Imagine, for instance, applying some impulse to a ball (with a bat, say).  What we can know immediately is that
$$m\vec{\Delta v}_{cm} = \int_0^T \vec{F}(t)\,dt$$
assuming the impulse is zero outside $[0,T]$.  This tells us how fast the centre of mass of the ball is moving at the end of the process.  But it doesn't tell us anything at all about what shape the ball is during and after the process, and whether, for instance, it falls apart if you hit it hard enough.  Those things are interesting to people designing balls, for instance.
To answer those questions you need to treat it in a much more sophisticated way, using continuum mechanics.  This, of course, is also using Newton's laws of motion, but it is applying them to the ball considered as a continuous mass distribution, not as a rigid body.
