Yes, I know that there is a maximum distance for ship sensors (military vs civilian), but when the referee says something to the effect of "ship detected"....
First off, that max range you're talking about is for combat purposes. The ship's sensors can actually "detect" out to a much farther range.
With enough time, the ship's sensors can detect things in other galaxies, not unlike the real technology we have today on Earth.
The max range for ship sensors referss to targeting lasers and missiles (which is a bitch at the ranges indicated, like using a pistol to hit a single grain of sand on the beach from 50 miles away).
When a starship enters a system, just about every starship in that system should be detected automatically (given a little time) providing the ship isn't doing something (like hovering over a planetoid or hiding behind a planet) to conceal itself.
Once the ship comes into combat range (using the distances you cite), then combat can occur.
My point here is: The crew will know about the other vessel a long, long time before combat is even an option.
This is the main reason
Traveller rules don't spend a lot of time on sensors. They're considered part of the bridge electronics package in the starship construction rules, and there is little reference given them there. The space combat section gives ranges for targeting, as you've already noted.
Unless a ship happens to hide itself in the magnetic sphere of a Gas Giant or behind a moon, or in an asteroid field or world's ring system, there should be very few instances during a game where a ship appears out of no where and attacks the player's ship.
Most of the time, pirates and corsairs will be disguised as some other type of vessel....maybe as a civilian skimming fuel at the local gas giant.
The only time the players should get worried over a sensor contact of another vessel (and, as I said, the player's ship should have plots for 99.99% of the vessel in the system) is when that other ship is within combat range.
Also note that, even if the players are attacked by pirates, there is little other ships in the system can do about it even though they can see on their sensors that the attack is taking place.
Think about it. It's 1 day and 8 hours at 2Gs from the Gas Giant to the system's main starport. The player's ship is skimming fuel, and another vessel approaches the GG.
Then, the new vessel shows its true colors and attacks. It's a corsair.
The starport officials, and every ship in the system, will "see" the attack on your vessel fairly quickly (time lag for signals travelling at the speed of light). It's just that the nearest ship that can help you is 1 day and 8 hours away.
They'll see the entire attack--and can't do a damn thing about it.
One more thing to consider is the velocity of a nearby ship. In Traveller, ships travel at their fastest G rating because its the most economical. A ship will accelerate at full thrust to the mid-point of its journey, and then decelerate the rest of the way.
For this reason, it's not hard to tell what leg of a journey a ship is one because the ones that are travelling "backwards", with the drives "facing" the direction of movement, are the ones slowing down on the second leg of the trip.
Let's say that your player's vessel is attacked by pirates at the GG, but another ship is coming close by--this one on a journey from the next closest planet to the starport.
This vessel will fly by the player's ship, unable to help in the attack as well.
Why?
Let's say the GG is over half way of this new ship's journey to the starport. That means that the new ship is travelling "backwards", it's drives "facing" the starport, and it is slowing down as fast as it can.
If the entire trip is 3 days, and the ship is 2 days into the trip, when it passes the player's ship, it will take the vessel another whole day to slow down. Plus, once it slows down, it will be at the starport.
By that time, the pirates will have taken what they wanted and left the player's crew for dead (or abandoned...whatever).
The point here is: even ships close by won't be able to help in an attack if their velocity is high enough.