A creature can take something from a mage hand but there are no explicit rules for this situation
The spell text for mage hand doesn't state the conditions under which an item could be taken from the spectral hands grasp.
However, the game does provide DMs with tools, which I have applied as follows in this situation in my own game.
Isn't the mage hand pretty weak?
The rules state that '[t]he hand can’t carry more than 10 pounds.' But this doesn't explicitly refer to it's grip strength and so doesn't necessarily mean that, once it's holding an object, that an object can easily be taken from it by a much stronger PC. It might be a reasonable logical step - but real world physics or logic don't have any official bearing on the rules for this situation.
It's up to your DM to decide how much weighting they'd want to give this reasoning. They could decide that the mage hand's perceived weakness makes removing an item from its grasp essentially trivial, if so no roll would be required. Otherwise...
...this could be a resolved via a contested check.
Sometimes one character's or monster's efforts are directly opposed to another's. This can occur when both of them are trying to do the same thing and only one can succeed, such as attempting to snatch up a magic ring that has fallen on the floor. This situation also applies when one of them is trying to prevent the other one from accomplishing a goal — for example, when a monster tries to force open a door that an adventurer is holding closed. In situations like these, the outcome is determined by a special form of ability check, called a contest.
Both participants in a contest make ability checks appropriate to their efforts. They apply all appropriate bonuses and penalties, but instead of comparing the total to a DC, they compare the totals of their two checks. The participant with the higher check total wins the contest. That character or monster either succeeds at the action or prevents the other one from succeeding.
From your wording 'The DM had the other PC make a Strength check against my Strength score' it's not clear to me if this was a contested check - it sounds like your DM used your strength score to set a DC, rather than having you both roll, as you would in a normal contested check.
In this situation, your character's strength has nothing to do with the strength of your mage hand. So a contested check should probably more appropriately pit the opposing PC's strength against your spellcasting ability (intelligence for Arcane Tricksters).
If your DM wants to account for the apparent weakness of the mage hand in this situation (as discussed above), as part of a contested check, then I would advise employing the rules for advantage and disadvantage here:
The DM can [...] decide that circumstances influence a roll in one direction or the other and grant advantage or impose disadvantage as a result.
So, in summary, in my own games I have ruled that this situation should be resolved via a contested strength check from the opposing PC against an intelligence check with disadvantage from the Arcane Trickster.
As an aside, don't forget that 'you can move the hand up to 30 feet each time you use it', so to avoid items being stolen from your mage hand in the future, you could simply keep it floating high up enough so as to be out of reach of most others, whenever it was not needed.