Hi ElBe, this is not a proper idea but it works by a side effect:
exists()
is a method of a Page object, more precisely of a BasePage object. You have to create the object first to use it:
page = pywikibot.Page(site, 'Page')
if not page.exists(): pass # or do something sensefull
Your example works because
pywikibot.Page(page)
clones the original page and creates a new Page object. This functionality to implemented to upcast objects e.g.
fp = pywikibot.FilePage(page)
which creates a FilePage object and provides further methods. But keep in mind that page must be in File: namespace here.
Refer: https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html?highlight=exists#pywikibot.page.BasePage.exists