Reason: You are accidentally pressing Enter too many times when scrolling through the Terms and Conditions. This causes you to accidentally reject the Terms and Conditions by pressing Enter, which means "no" in this context. So when you finally type "yes" you are not responding to the question, but rather invoking the Linux "yes" command which prints this endless stream of y's!
Solution: When scrolling through the Terms and Conditions, use the down arrow or space instead of the Enter key. Then you won't overshoot accidentally.