Prepare your Mac before parting with it

Do not manually delete contacts, calendars, reminders, documents, photo streams, or any other iCloud data while signed in to your iCloud account. Doing so will not only delete that information from your Mac, but will also delete it from the iCloud servers and any other devices you also sync with iCloud.
— Apple Support
Source: Apple.com

Source: Apple.com

With everything on the Cloud information on any device might mere be a facade of the real piece lying somewhere else. So it is very important to follow these steps before parting ways with your Mac, not just for privacy and security concerns but also for the security of the information that you don't want to lose and want to transfer to your new machine.