Seeding places the highest ranked players in a draw so they cannot meet in the early rounds, spreading them across the bracket by rank. Grand Slam singles draws seed 32 players out of 128, which means the top seed and the second seed can only meet in the final.
The purpose is to protect the tournament rather than the player. Without seeding, a random draw could put the two best players in the world in the first round and leave the second week without a contest worth selling, so the draw is structured to hold the strongest players apart for as long as possible.
Seedings normally follow the rankings exactly, and where they have not, it has caused arguments. Wimbledon long used its own formula that weighted recent grass court results, which could move a player several places either way, before dropping it in favour of the standard rankings.
Being seeded is worth more than the ranking alone suggests. A seed cannot draw another seed until the third round, so the difference between being ranked just inside and just outside the cut-off is the difference between two winnable matches and a possible meeting with a top player on day one.