iOS apps are primarily written using Objective-C and Android apps are in Java. The languages aren’t entirely different, but there’s plenty in just language alone to make porting difficult. On top of that, there are different design specifications, hardware setups, and many, many other factors to consider between devices. For one thing, if I write an app for iOS, it’ll work for any device. If I make an app for Android, it may have bugs on certain phones that won’t exist on other. I remember when I first got my S3 that some apps had really strange bugs that I didn’t experience on my S2.
Porting apps from iOS to Android (or vice-versa) can be a bit of challenge. There are a few things that let you write code for all devices, such as Qt or Unity, but for the most part the app has to be entirely rewritten. This takes a lot of work. I’m not going to lie when I say that I think iOS is easier to develop for.
It takes a while for companies to release apps. iPhone came first and was more popular for a very long time. It takes a while (something called lag) for companies to adopt to new markets.
This is Apple’s developer website. It’s friendly, simple and says "Develop on iOS!"
This is Google’s. It’s not quite as nice and it takes a lot more to get started on Android that iOS.
I’m not saying that companies should avoid one OS or the other. I think if possible, all apps should be deployed on Android, iOS, and Windows Phone, but companies may not have enough resources. So they need to decide who they appeal to. Who historically has had smartphones? People who have more money. Who are more likely to use apps? Those with smartphones. So for a bank, they may want to target people with more money. You may think "it doesn’t affect their revenue," but it does. I choose my bank over another because the other didn’t have check depositing via an app. As a company, it takes resources, and lots of them, to port between devices. You need to select your market.
Conclusion – Different code for different phones.