It's in return for the payment. You have to be part of the lottery's publicity machine, otherwise, nobody would know someone won, and people would stop buying tickets.
Not quite right. They print your name so that other lotto players will know that the winner is not connected to the lottery and everything is on the up and up. This is law in most states that hold lotteries.
That being said, if you go on TV, or give extended interviews, the lottery WILL set that up in the name of publicity, but it isn't a requirement to getting the prize. As long as you are of age and you broke no rules in obtaining the ticket, you will get your prize.
If I won I would leave my job, sell my house, change my phone number, get a good lawyer, and financial adviser, BEFORE I turned in the ticket. Give the lottery the absolute minimum information, and get out of Dodge for several months at least. I would take a vacation, and keep my circumstances to myself. That isn't a cure all but it's better than "appearing on 8 TV shows" in the first couple of days.
There are a couple of states where you do not have to disclose your name but in the others your name is disclosed, but you do not have to give interviews. I heard the lottery suggests you give one interview at least or the reporters would hunt you down. Whitaker sought out publicity compounding his problems.