Scenario 1 : I myself have stayed out of US on H1b for more than 30 days multiple times. All these times my US companies were generating my paystubs in USA.
Scenario 2:
a) Several India based companies send their H1b/L1 holding employees out of USA for extended periods ( 6 months onsite, 6 months offshore) and run their payroll in India for those periods.
b) I work for a big US based Consumer Goods company. My company has in-house "Global Mobility" department and works with largest US immigration firm for employees visa processing. One of my H1b holding colleague wanted to work from India for few months due to family issues. He was advised by HR that company would transfer his payroll to Indian office for the duration he wanted to work from India. Off-course, he worked out a deal with his Manager and told HR that he would be working from home from USA for the duration and then went to India.
c) Few US based desi (Indian) bodyshops ask their H1b employees to look for project from outside of USA , while they are off project, in order to remain in H1b compliance. Few of my friends left USA for this reason. Few found project and returned to US while others could not find Project and had to find job in India. Such Desi bodyshops do not run payroll while employees are out of USA.