Interesting question. Indeed it is related to the working of cardiac muscles. First of all, lets have a look at the structure of a sarcomere of a cardiac muscle from here:
Here, what we can see is that the t-tubule is a depression formed in myocyte. It is important to know this fact here. Why? See this:
In contrast to skeletal muscle, cardiac muscle requires extracellular calcium ions for contraction to occur. Like skeletal muscle, the initiation and upshoot of the action potential in ventricular cardiomyocytes is derived from the entry of sodium ions across the sarcolemma in a regenerative process. However, an inward flux of extracellular calcium ions through L-type calcium channels sustains the depolarization of cardiac muscle cells for a longer duration. The reason for the calcium dependence is due to the mechanism of calcium-induced calcium release (CICR) from the sarcoplasmic reticulum that must occur during normal excitation-contraction (EC) coupling to cause contraction.
First, cardiac muscles don't work by external action potentials, they work on a cycle governed by themselves, known as the cardiac cell cycle.
Second, as is clear from above paragraph, these cells depend on extracellular Ca2+ ions for initiating contraction, a clear difference from skeletal muscles which need Ca2+ stored in SR. Hence, they require t-tubule at a place where a sarcomere ends. Obviously, having a depression in the middle of a sarcomere (i.e. between I- and A-band) would not work here.
Also, the structure of t-tubules is also different between the two. Compare my first image with the image below from here:
In the second one (from skeletal muscle), t-tubule seems like a mere little pit covering the muscle cell in 360° like a duct tape. In the first image, the t-tubule is more like a double wall dividing 2 sarcomeres. It is so because in skeletal muscles, t-tubules have to just transfer the action potential to SR while in cardiac muscle, they have to transfer calcium ions into the cell. So, at the end, the difference is not in efficiency, but in function.
If we look at non-mammalian muscles, then the cause of presence of t-tubules at z-lines couls be associated with presence of large amount of sarcoplasmic reticulum at z-lines. See this article:
Electron microscopic examination of developing myofibrils in regenerating skeletal muscle of Rana pipiens tadpole tails reveals that SR is in regular and close association with Z-lines of young sarcomeres before t-tubules have formed alongside the myofibrils. SR is also associated with M-lines of young sarcomeres but on a less regular basis than with Z-lines...This suggests the formation of a specific bond between SR and Z- and M-lines...These observations support the conclusion that SR does not initiate formation of Z-line precursor elements, but rather associates with Z-lines as they condense from more diffuse Z-bodies.
Since SR is thought to be bonded with z-lines during their formation from z-bodies, hence large amount of SR should be present at the site of association. Hence, it might be beneficial for t-tubules to be present at z-lines to efficiently transfer action potential to SR. However, such association might be absent in mammalian muscles, which can partly answer your next question.
EDIT 1: As you asked in comments
what it would have been if duct like to tubules of skeletal muscle would were present at z line instead of a-i junction?
Now we head towards evolution aspect. Yes, it might have been more effective for skeletal muscles to have t-tubules at z-line instead of A-I junction, but it would not be effective enough to create an evolutionary pressure. Both of these could have same effectiveness too, but during the course of evolution, only those traits which have much greater and direct benefit to an organism's survival and fitness are selected. There is no specific answer for 'why we have 5 fingers instead of 6 or 4', the answer is just that there is no such benefit in having 6 or 4 fingers which would cause it to be selected against 5 fingers.
EDIT 2: Obviously, its exact cause can never be known, but following might also be partly helpful. In mammalian muscles, close communication between SR and mitochondria has been observed. Such so- called "through-space" communication is an important feedback system for effiecient muscle functioning. See this article:
the SR and mitochondrial function in muscle are not independent as calcium uptake into the mitochondria increases ATP production by stimulating oxidative phosphorylation and mitochondrial ATP production and production/detoxification of ROS/RNS, in turn modulates SR calcium release and reuptake...The resultant anchoring of mitochondria to the Calcium Release Units provides a structural basis for maintaining bi-directional SR-mitochondrial “through-space” communication during vigorous contraction.
Now, for such critical communication, SR, t-tubule and mitochondrion need to be as close as possible for fastest & direct communication. Hence, SR & t-tubules need to be as near mitochondrion as possible.
Ogata and Yamasaki used electron microscopy to provide the first detailed description of mitochondrial localization in adult mammalian skeletal muscle (Ogata and Yamasaki, 1985). These studies revealed that mitochondria are located within the I-band, adjacent to the CRU on either side of the Z-line. Precise localization of mitochondria adjacent to the CRU at the A-I band junction was subsequently confirmed in non-fixed rat skeletal and cardiac muscle (Vendelin et al., 2005). Juxtapositioning of mitochondria adjacent to sites of Ca2+ release that occur during EC coupling provides a structural basis for potential local or privileged communication between these two organelles (Rossi et al., 2009).
Thus, presence of mitochondrion at A-I junction and of a "through-space" communication also tend to answer this question.