Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Why the shift helps can be explained by considering the QR of $H-rI=QR$. Since H is unreduced Hessenberg, it's first $n-1$ columns are linearly independent for any $r$. But if $r=\lambda_1$, $H-rI$ is singular. Then $r_{nn}=0$ and the last row of $R$ is zero. Then the last row of $H'+rI=RQ$ is zero except $nn$ component is $r$. So $r=\lambda_1$ or close to $\lambda_1$ will make $H'+rI$ $n-1,n$ component zero or closer to zero. This explains why the shift help. But this explanation doesn't fit well with the power iteration, where the component of $x'=(A-rI)x$ in $v_1$ actually decreases.