According to JMeter help,
This is for use with samplers that can generate sub-samples, eg HTTP Sampler with embedded resources, Mail Reader or samples generated by the Transaction Controller. Main sample only - assertion only applies to the main sample Sub-samples only - assertion only applies to the sub-samples Main sample and sub-samples - assertion applies to both. JMeter Variable - assertion is to be applied to the contents of the named variable
In most cases, only the main sampler has all the necessary response data, but currently due to ajax, a single request within the jquery framework can generate many sub-requests inside, and each of them has its own response data.
Thus, in most cases, searching in the main answer of the samplers is enough


But if you know or find out that the request has several subqueries, and the answer can be anywhere, then you can select the "main samples and sub-samples" radio button so that you don’t miss the sub-queries.

source share