Several comments:
When the high school sends out a transcript, it also sends out information about the high school itself. This lets the college know all those "extra things" that don't show up on a list of grades. For example, I went to a tiny, rural high school. My school's information would have shown that only a handful of AP classes were available, so the college wouldn't look down on me for not having taken AP Spanish (I use this example because my high school didn't even teach Spanish). This is fair because being #20 in a public high school class of 400, where the students range from top-notch to crackhead, is quite different from being #20 in a class of 50 in an elite private high school where everyone is college-bound. Colleges do take these things into consideration.
I've long thought that AP classes aren't quite what they're cracked up to be. Oh, don't get me wrong: They are more rigorous, and all the studies say that more difficult classes = better preparation for college work. BUT each college gets to decide what it will/won't accept FOR CREDIT. So your state's flagship college may flat out say, "We accept only grades of 5" or even "We don't accept any AP credits"; while the tiny private school that needs to work harder to recruit students will gladly award credit for a grade of 3. Also, some colleges allow students to move on to an upper level class but don't award , credit (so they might allow the student to move straight into Biology 1102, but they don't give credit for Biology 1101 -- thus, the student still needs 3 hours of elective credit). A friend of mine ended up in trouble because she thought (at graduation time) that she had 3 hours of credit for a high school AP class, but the Registrar's Office thought differently; they'd noted that she passed that class, but they didn't award her credit. It was a bad thing to discover as a college senior. Since students can't know where they're going to end up going to college, AP classes are a gamble. Teaching seniors, I hear lots of stories about this type of thing, and more often than not, it's "I'm glad I took AP Chem. I learned a great deal, but I'm not getting the credit I had expected for college." So take the classes, but take them because you want the extra challenge and preparation for college . . . if you end up with a college credit, that's just a bonus.
A more "sure thing" for credit-transfer is dual enrollment in the community colleges (taking a community college class during senior year). These are less rigorous than AP classes, but basic English 101 or College Algrebra 101 is going to transfer. These classes transfer into the college as credit classes, but they do not help or hurt the college GPA.
School systems do set their own grading scales, but individual teachers can't do that. Around here, all the high schools are on the 7-point scale (93+ is an A, 86+ is a B, etc.), while colleges are on a 10-point scale (90+ is an A, 80+ is a B, etc.). Who decided that? I dunno, but it's been that way all my life.
All schools do not rank students. All schools do not even recognize valedictorian and saluditorian. It's because the difference between #1 and #2 is often so slight that many people complain. Personally, I think it's just one more thing in a long line of failed attempts to help kids' self-esteem. Know who agrees with me? My friend whose son was #3 in the class and just barely, barely, barely missed out on sitting on the stage at graduation and making a speech.