Post pictures of all the wires in the box.
And of the receptacle, and show which screws used to be attached.
You are not describing it very well, even though you are making a good effort.
Power often comes into a box, then runs on to somewhere else.
Did both these black wires come off of brass colored screws?
If one wire came from a silver screw, it is a neutral wire, even though black colored.
It should have white tape or paint on it, but that can come off over time.
Be aware that you can’t trust wire colors when using cables like that.
Black wires might be always hot, or only hot if switched from somewhere else.
And white wires might be neutrals, or could be hot or hot switched wires.
The white wires in that case should have black tape near the stripped end, to indicate they are hots, not neutrals.
And if Uncle Joe or Cousin Moe did some wiring, then a black wire might even be a neutral, and not taped or painted white.
If one black wire is a neutral, it might be attached to a different circuit, and it could be looking for a path back to the breaker box, and the ground wire would provide that, so it would light up the tester.