If you just press the lock button, the doors will lock.
If you press and hold the lock button for a about 10sec any open windows and the sunroof, if fitted, will close.
If you want to leave a windows open for some strange reason, just press and release the lock button and the car will lock, but the windows will not close. Then the first breath of wind through the open windows will set off the alarm, unless you disable the ultrasonic sensors using the button in the door pillar.
When you come back to the car on a very hot day you can press the button to unlock the car and switch off the alarm and if you keen the button pressed again for about 10secs the side windows will open.
This is not new - all my A3s since 1998 have worked in exactly the same way.
Don't know about the rear windows on a Sportback as I've never owned one.