Answer:
One way to look at this is to consider the forces acting on any point in a string.
For a very small portion of string F = M a must still hold. As M approaches zero the small portion of string would have to approach infinite acceleration if the net force on that portion of string were not zero.
One generally considers the net force acting on the center of mass of an object not the individual forces acting on each infinitesimal mass composing
the object.