Normally it gets connected to your Apple ID when you log in for the first time to the App Store and don't have deleted it before.
Then you can install it on any Mac you like for free. And it should appear in your purchases list. Do you see it there?
Does the 2010 MBP maybe have an older OS X version on it that is not able to run the version of Pages that came with your 2012 rMBP? You can test that by installing it from your purchases list in the App Store.
It could also be that you just were not logged in. When you wanted to download it from the App Store.
Or did you maybe move to a different country and changed that in your Apple ID? I don't see my purchases from the country i lived before anymore. There is always a price and when I "purchase" it again I get a message like "This update is free because you already purchased an older version of the app before". That's really annoying. Because even after that I don't see it in my list of purchases and apps that are not available anymore, like iPhoto and older OS X versions for example can only be downloaded if I switch back to my old country and there it's then the same with purchases I made in my new country. And you can't even change the country if you have any subscription like iTunes match or Apple Music running.
I removed my credit card as precaution because I have two IDs now and sometimes forget to login with the old one. So that I don't have to pay if I am logged in with the wrong ID and purchase it again.
Since that happened I never bought a single app on the Mac App store again, just some free ones. And on the iPhone App Store i only purchase free apps or use free TestFlight betas of paid apps. And everything only with my new ID.
It's even worse with media content (all purchases in the iTunes store) they are only downloadable for free again with my old ID if I switch the country to a fake address and back after the download. But I don't have to download my music anymore. There are enough backups.
But I should transfer every device in the support profile to my new ID and take the old one back to the old country forever, to see the list of everything I really paid money before again. Strangely in iTunes on my Mac in the account data I have access to a list with all purchases from both countries, but not in a single of the store apps.
If you never changed the country of your ID, just look if it is in your App Store list and you can try to install it from there. But normally you should not see the price if you search for it instead or click on some link to it and are logged in to your country's store.