Windows 2000 was code versioned Windows 5.0 and Windows XP as Windows 5.1. Next version was Windows Vista which was code versioned as Windows 6.0. Since Windows 7 is the next Windows version, Microsoft decided to call it Windows 7 for easy and better understanding.
Short Note:
1.0: Windows 1.0
2.0: Windows 2.0
3.0: Windows 3.0
3.1: Windows NT
4.0: Windows 95, 98, 98SE, ME
5.0: Windows 2000
5.1: Windows XP
6.0: Windows Vista
7.0: Windows 7