A boot sector virus replaces this sector with its own code and usually moves the original elsewhere on the disk. Even a non-bootable floppy disk has executable code in its boot sector. Most effective anti-virus products will be able to remove a virus from a partition sector, but some have difficulties under certain circumstances. Unless you know precisely what you are doing this is unwise. You may lose access to the data on your hard disk if the infection was done by a virus such as Monkey or OneHalf.
Format leaves the partition sector untouched.
There is always a better way of removing a virus infection than formatting the hard disk. This sounds so silly I hesitate to include it. And, of course, shrink-wrapped software could have been infected before the duplication process.