For Android you don't need an appstore at all, but for iOS you always have to use the appstore, unless you can get a hold of an enterprise certificate from Apple, but that's near impossible.
PS. Because of EU regulations Apple will probably be forced to make sideloading possible in the future.