Nope, it's because of the location, infrastructure, stable politics (due to effectively being a one-party state), favourable tax laws and business friendly regulation. However all these factors kind of do act as a defense, because many countries are benefitting from those foreign companies investing in Singapore. This discourages anyone to attack