Is there a special reason why dry rubs are meant to work with grilling over other cooking methods?
Well, if you deep-fried something with a dry rub:


all the oil-soluble flavors would dissolve into the fry oil. You lose your flavor, and also probably greatly shorten the life of the oil. (How long you can use it before it starts smoking and/or imparts a bad flavor).
a lot of the rub would wind up falling off and making mess at the bottom of the pot/fryer. (A fryer with a cold zone at the bottom would probably be OK, but most things you're using at home to fry isn't going to be — will surely start burning on the bottom of the fryer). Compare to how in a smoker or grill, if some falls of, its not really a problem.
BBQ dry rubs are often fairly sugar-heavy, would probably brown way too fast and ultimately it'd either burn or you'd have to pull the food out before it was cooked through.


If instead you mean pan-fry, shallow-fry, etc., then the latter two will still happen.

You can use a dry rub with other cooking techniques: for example, roasting in a moderate to low oven or slow-cooking in a crock pot. (The amount you use, especially in a crock pot, would be different). Ideally, with all these low-and-slow cooking methods, the flavor from the rub has a chance to penetrate; it wouldn't with a fast method like frying.

And even with fast cooking methods, you can do something similar; e.g., salt and pepper on meat before throwing it in the saute pan is sort of a dry rub. And when pan-frying, it's pretty common to put spices in the breading or binder.