Why do you need macports or homebrew to get open source software installed? Why can't you find this kind of software in the app store?
You can find open source in the app store e.g. The Unarchiver source is on BitBucket
However app store only provides apps and these have to be standalone and not depend on other apps and have other restrictions, thus Unarchiver suggests you download from outside the App Store
Most things in Macports and Homebrew are command line tools or at least launched from the command line so could not be in App Store. Also historically Macports and Homebrew existed before the app store
There are also license issues to go in the App Store you have to include some Apple non open source code - for some licences e.g. GPL this can't be done - if you get all the coders to agree you can do this but if only one contributor disagrees then the app can't go in the App Store e.g. vlc