Numerous jamaa’aat in the masjid

What is the ruling about the numerous jamaa’aat [established for the obligatory salaah – taking place] in a single masjid, particularly when some of them pray after the imaam has completed [the first jamaa’ah], and some others intentionally delay [their arrival] until after the imaam [has completed the first jamaa’ah], so they can pray with another jamaa’ah?