Apple does have better security than Android (in general, being a single vendor controlling the whole stack, from transistors, to build, to OS, to software), but I think their point was different. I believe the idea of the ad is that with Apple your privacy is better protected than on an Android (with Google being an ad and search company which uses your data for profiling).
Which is a fair point, and becoming more and more relevant as the time goes by. Personally, I am on an Android, and I do trust Google with my data, and understand the privacy trade-off of using their services. On the other hand, I am not on Facebook precisely because I do not trust them with my data and do not find their service worthy of a privacy cost involved.
More to the point, if you're on an iPhone because Apple doesn't spy on you, but you are on Facebook, you're like one of those people that are declared health nuts who take supplements and exercise regularly, but at the same time smoke a pack of cigarettes a day.