I don't know every conceivable reason why a church would track attendance, but one reason: churches that use / sing "cover songs" (i.e., not public domain, not original compositions) need to pay licensing for the songs, and one of the variables on how much the licensing costs is the average number of people in attendance.
[EDIT: https://us.ccli.com/licenses-and-services/church-copyright-l... ]