That's not accurate, Facebook let's them target ads to demographics but lets them do so to anyone, regardless of whether you liked them and liking them doesn't help them in this way, it helps Facebook that way. Facebook then uses this data to target ads, but the companies asking you to like them are almost always doing so because they want eyeballs, it's almost never for the demographic data (which is more useful to Facebook.
Once you "like" them, they can send free ads to you instead
of having to pay for the demographically targeted ones. You are subscribing to their ads and that
is their motivation, it's almost never data collection but a free audience for promotional posts.