You can use ipatool to download ipa files from appstore.

Requirements
```
macOS 10.11 or later.
Apple ID set up to use the App Store.
```

github: https://github.com/majd/ipatool

install ipatool on mac:
```
brew tap majd/repo
brew install ipatool
```
first you need to login:
```
ipatool auth login
```
then you need to purchase a bundle to be able to download it:
```
ipatool purchase -b com.cisco.anyconnect
```
then you can download the bundle:
```
ipatool download -b com.cisco.anyconnect
```