I purchased an app on my iPhone and the app is also on Mac When I looked in the purchased section in the Mac App Store the app was not there. Am I doing something wrong or do app have to be purchased on both iOS App Store and Mac App Store?
Is your question about an iOS app which has an equivalent macOS app? 

In this case, they are really two separate apps with the same name. 

Purchasing or getting the iOS app on your iPhone does not automatically give you the macOS version on your Mac.

You must go to the macOS App Store and download the macOS version.

Examples of apps I use that meet this criteria:

Evernote, Google Chrome, Firefox, Google Earth, Dropbox, Kindle ... and many, many more.