Re: Why would anyone run a "coding test" on their own desktop?
As a consultant I always did everything in a VM, except for my first couple contracts around the turn of the millennium. For several reasons:
1) I boot Linux on my laptop, and most companies are Windows based
2) I always owned laptops with 16 or 17" screens, companies never distributed laptops with screens that big
3) By keeping my "work" stuff completely separate I didn't have to worry about breaking any NDAs by keeping stuff I shouldn't, nor with accidentally giving them access to my personal stuff (insert your favorite stories about someone attaching a "personal" photo to a work email)
4) Since my personal email was a quick switch between environments away I never had to use their email for anything personal, ever
5) when they'd provide a laptop I'd P2V it and return theirs, they were usually pretty happy about having one less laptop out in the field - sometimes I even got them to send me a VMware disk image rather than a laptop and save us both some bother
I never had any concern with security since while it was my personal laptop it was used only for my consulting business so really the only personal stuff on their I wouldn't have wanted them to have access to would be stuff like invoices from previous clients. I suppose it had ssh keys for passwordless login to my PC at home that did have the real personal stuff.
I can't imagine someone having a personal laptop that they used for stuff like banking or stored their crypto wallet and downloading and installing software packages or running random scripts on it they provide. Anyone dumb enough to do that isn't employable in IT beyond "guy who changes toner cartridges in office printers".