Syntax of REPLICATE() is:
REPLICATE (string_exp, numOfTimes)
If string_expression is NOT of type varchar(max) or nvarchar(max), REPLICATE truncates the return value at 8,000 bytes.
Ex: In REPLICATE( 'C', 10000) statement, first argument is of type VARCHAR but not the VARCHAR(MAX). That is the reason REPLICATE truncates return value at 8000 characters