Apps earn from a lot of ways. Some people put ads on them so you can earn through the ads income. Some people get sponsors for their apps, so sponsors pay them a lot of money. Some sell advertising spots on their apps so they earn through it. Some apps get a lot of donations from their users so they earn through it.