Thinking back to when I last worked in Obs/Gynae, if somebody has had a hysterectomy (with or without bilateral salpingooophrectomy), there's a good chance that it was performed transvaginally - which means there's no outward physical signs.
To get the physical main notes, as the A&E system runs independently, requires a lengthy process of request and bringing over/tracking even on a weekday in normal office hours. And then it's often the case that the surgical records are less than obvious or were orphaned at the time, so never made it onto the main file or are sitting on a set of duplicate/dummy notes where the original ones weren't found at the time or because the patient's details didn't quite match up so a separate set were made. If they're lucky, it was coded appropriately. And they aren't actually in a remote secure storage location ten miles away, rather than half a mile across site. If they'd only ever been at the one hospital and hadn't actually been somewhere else at the time.
If the GP is open, perhaps they'd be willing to say over the phone that they've got a discharge letter relating to a hysterectomy on their records. But there's massive issues with that in terms of GDPR.
So the time that would take is often significantly longer than giving fluids to be able to do a quick test.
Turning to pregnancy itself, women can be mistaken, not know, have been raped, stealthed/raped, blanked a traumatic experience out of their memory, drugged and raped, not want to accept it as possible, be terrified of somebody finding out they're sexually active, not be able to accept it's possible due to gender dysphoria, sterilisations can fail, need to keep a pregnancy secret, mistake it as menopause, still be bleeding regularly each month, be on long term contraception that has run out and they haven't realised - so many things that could result in somebody insisting they couldn't possibly be pregnant when they actually are.
As an aside, before terminations were as easily available, it was a known thing that gynaes would bring women in for D&Cs due to 'heavy/irregular periods' or sterilisations/hysterectomies and then 'notice' as they were performing it that they'd 'inadvertently' terminated a pregnancy that would have purely coincidentally been unwanted. Sadly there would have been others where an unknown pregnancy would have been wanted but the gynae carried on. Obviously, this is unacceptable legally and now there are procedures in place to prevent it.
In addition, medical staff have the right to abstain from taking acts that would terminate a pregnancy. They have the right to have the information to enable them to decide whether they perform a procedure, whether it is truly a case of the woman's life being at risk or whether they need to get somebody else to perform it.
There are also medical reasons where a pregnancy makes a huge difference to the likelihood of somebody surviving surgery. They need to know in advance whether there is a thumb sized womb located in the pelvic region or whether they're going to find a large organ with a strong blood supply in the way. Or an ectopic pregnancy. Because a surgeon specialising in bowel issues is not the best person to be dealing with a ruptured fallopian tube or a molar pregnancy.
It's not about assuming that one particular woman in pain, disorientated and clearly unwell is too stupid to be believed, but that people on the whole make mistakes/don't know everything, it's a very important piece of medical information that affects the diagnosis and care of any woman, it can have huge emotional, physical and legal consequences for both patient and medical staff if they get it wrong and it's still quicker and more reliable to do the test than it is to cross their fingers and hope this one is right.
If the OP truly had no urine whatsoever in her bladder (which is quite unusual, as normally the kidneys keep functioning and small amounts come in continually), the act of rehydrating also improved her health to cope with surgery, established that the kidneys were still working and enabled them to proceed with full knowledge that they weren't about to go into a medical situation complicated or caused by pregnancy. Had it been operate now this very instant or die now, they would have done so, but whilst she was very, very ill, she wasn't at that stage. So they had time to do this.