These clubs earn a lot of money by qualifying for the European Champions League. Their players also gain a lot of visibility when they play in the European Champions League. This can attract sponsors, and the big teams can buy some players from these smaller teams.
Another good reason, thank you mate. I am ware of certain good players in lower divisions, they are not well known if they dont participate in big competitions. I have also come to understand that, not everyone come to watch the Champions League game, the scouting team and director of sports, also look out for potential players they can get during the January transfer window or in the summer.
I'll also want to make clarification in the aspect you said they earn a lot of money. I doubt that. These small teams dont really go far in the competition. The higher you proceed in the tournament the higher the money you get.