They know from the beginning that they want you, but will keep you in suspense till the official offer.
I guess their customer (NIH) was under the time pressure: hire someone or loose the funds for the position. It was the panel interview with the department members. All questions were related to the science. My impression was that I didn't do great, but still got the offer. The last thing they ask whether I'm OK sitting in the common lab space, since they do not have an office space for this position yet. So I was warming up the sit for 7 month till the next fiscal year came around. The first week of new fiscal year I was terminated, with the "under-qualified" characteristic (like it took them 7 month to figure this out :-) I'm not complaining, money were good. But now I have to start job hunting from the scratch without the usual 2 week notice.