It can be logical. In the right situation you can set mine vs a mid stack.
Since a set mine is an implied odds play you can set mine if the effective stack is 20x (IMO 15x is enough) the price of the call pre flop.
Ex EP 100bb opens 3x you are in the BB with 88 and a 40bb stack and it folds to you. If you know villains range is very tight and that he doesn't like folding his medium hands post flop. Then you have profitable call since you will get the implied odds since you only have to invest 2bb to see the flop and won't get squeezed out of the pot.
this is a very specific scenario and it depends a lot on villains tendencies and if he pays attention to your calling range and post flop lines in BB because if he gets wise he will adapt.
Another good scenario is the multi-way pot since you'll know exactly where you stand post flop.
Then theres the case where a weak big stack villain ignores your stack size and calls with a PP in the hopes to create a multiway pot with other big stacks.
And then theres set mining with middle pocket pairs like 88-JJ because they have inbuilt showdown value/playability in addition to their potential for sets
All this being said, most of the time set mining won't be profitable if the mid stack open size doesn't allow for the call 20 rule