I have a HTC Wildfire with android 2.2 (I can't remember if this problem started right before or right after upgrading to 2.2, but the upgrade was done recently and so was the first time I got this problem). Sometimes (and it seems completely random) the screen lock function never works. When pressing the power button and pulling down the clock it tells me the screen is locked, but there is no lock there! When I pull it down I get to my home screen instead of the screen where I need to enter my lock pattern.
I think you'll find that is normal. I wondered about it at first too.. If you lock your phone by pressing the power button, your phone is LOCKED, but not SECURE. Because you have only just been using your phone, if you unlock it immediately by re-pressing the power button and pulling down the clock, you won't have to enter your pincode or pattern, because it's highly unlikely to have been stolen in the past 30 seconds. However if you lock your phone via the power button (or if it times out by itself) and then you leave it for a few minutes then the next time you drag down the clock to unlock it, you'll also have to enter your pincode or pattern, to verify that it's you.
If you want your phone to ask for your pincode every time, straight away, go to:
"Settings" > "security" > "lock phone after" > and select, "immediately".
I have mine set to 3 minutes for convenience.
Hope this helps..