Giving a shit test provides an opportunity for a man to demonstrate his strength. No woman is aroused by a spineless wimp. If he demonstrates strength then you can comfort test to ensure he won't use that strength against you. Then you can ensure that the man 1) is strong and 2) cares about you.

There are several flaws to this logic. 1) the easiest way to demonstrate strength is to be mean. The more you love a girl the harder it is to be mean. Kindness is usually misinterpreted as weakness. Therefore it's easiest for a man to pass a shit test when he doesn't love you

2) comfort tests can be faked

3) women often forget to comfort test if sufficiently aroused.

4) sometimes non-TRP men will test for kindness by acting weak and seeing how far you'll take it

Therefore shit testing selects for men that are more likely to use you. Seeing how a man stands up to other people is a much more accurate test.