Most shows that use canned laughter (Friends, Seinfeld etc.) were filmed in front of an audience. It’s not worth the hassle to set up audio recoding for the audience, especially because people aren’t reliable. They might not laugh at the right moment, one or two audience members might have a weird laugh, they might be too soft or loud.
The audience reaction is useful feedback for the actors, but the laughter is canned.