When you attach two monitors you do an Extended Desktop setup. Then drag whatever open windows you need to the second monitor. Also the video card manufacturer will have a utility, (eg nView from NVidia) that has a Wizard to help you to setup the extended display, change the resolution on them. You can do this from windows too quite easily.
You can do coding on one monitor, test it, open a browser or work on a spreadsheet on the second monitor etc
Depends what you drag to the extended display.
Remember an AIO is not upgradeable. Of course you can change the SSD or add RAM. But a desktop offers you the changeability and also easily fixable in case of a problem. I use these for large labs. Very much space saving, energy saving and neat. Since you are a home user, you got to think whether you really need it.