H1B transfer but i94 has old petitions date.

Hi ,

I had my h1b stamped for employer A , which was for 3 years and the petition is also valid for three years. Didn’t travel on that and transfered the petition to employer B which was valid for 1 year .At port of entry they didn’t ask any documents and my passport was a written with a date equivalent to first petition and the same reflects in i94 , the same time the petition A was still valid

I read it’s not legal to enter for work for a different company on a different petition,as they didn’t ask any documents,and the date is with respect to the first petition is it legal , did they assume I am going to work for employer A, if then am I saying illegally How do I know if employer A revoked the petition, in case status it still shows" case was approved "When everyone says H1 transfer is it really a transfer which impacts the existing petition or is it a new petition which is cap exempted that doesn’t impact prior petitions.Thanks in advance for the replies .