Superfluous code in Reference example of PROGMEM?

The Arduino Reference PROGMEM page* has this example:

#include <avr/pgmspace.h>
const char string_0[] PROGMEM = "String 0"; // "String 0" etc are strings to store - change to suit.
const char string_1[] PROGMEM = "String 1";
const char string_2[] PROGMEM = "String 2";
const char string_3[] PROGMEM = "String 3";
const char string_4[] PROGMEM = "String 4";
const char string_5[] PROGMEM = "String 5";


// Then set up a table to refer to your strings.

const char *const string_table[] PROGMEM = {string_0, string_1, string_2, string_3, string_4, string_5};

char buffer[30];  // make sure this is large enough for the largest string it must hold

void setup() {
  Serial.begin(9600);
  while (!Serial);  // wait for serial port to connect. Needed for native USB
  Serial.println("OK");
}


void loop() {
  /* Using the string table in program memory requires the use of special functions to retrieve the data.
     The strcpy_P function copies a string from program space to a string in RAM ("buffer").
     Make sure your receiving string in RAM  is large enough to hold whatever
     you are retrieving from program space. */


  for (int i = 0; i < 6; i++) {
    strcpy_P(buffer, (char *)pgm_read_word(&(string_table[i])));  // Necessary casts and dereferencing, just copy.
    Serial.println(buffer);
    delay(500);
  }
}

I combined two lines and deleted a lot of the code, but the output is still exactly the same. Here's what I did, and I left the original code untouched but commented out:

  for (int i = 0; i < 6; i++) {
    Serial.println(string_table[i]);
//    strcpy_P(buffer, (char *)pgm_read_word(&(string_table[i])));  // Necessary casts and dereferencing, just copy.
//    Serial.println(buffer);
    delay(500);
  }

Both versions run and produce the same output. Why have all those extra keywords, characters, and symbols? They don't seem to be doing anything that is apparent on the serial monitor since the simplified code does the same. Could the Serial.print be expanded/modified to show what it can do that the simplified code can't? (Or, put another way, what's the point in having it?)

what board?

Sorry, I didn't know it makes a difference. I'm using a Teensy3.2

Beavis4ever:
Sorry, I didn't know it makes a difference. I'm using a Teensy3.2

the avr/progmem.h is there only a fake to compile Arduino sketches written for AVR

Teensy3.2 is ARM

Does that mean that I should not have:

#include <avr/pgmspace.h>

as the first line (so I should comment it out)?

Beavis4ever:
Does that mean that I should not have:

#include <avr/pgmspace.h>

as the first line (so I should comment it out)?

Try it. You don't even need that line when compiling for an AVR, assuming you're using the Arduino IDE.

I'm using Arduino 1.8.8 and Teensyduino 1.45

I commented out the first line.

The output as seen in the serial monitor is the same as before.

The output as seen in the serial monitor is the same as before.

So, what have you learned?

You should have learned that the not-an-Arduino does not need special code to deal with data in FLASH.

PaulS:
So, what have you learned?

You should have learned that the not-an-Arduino does not need special code to deal with data in FLASH.

SAMD Arduino doesn't need it too. esp8266 Arduino uses progmem

OK, thanks to all who helped! I had no idea, so you've saved me a lot of time and energy.

To answer the question, "So, what have you learned": I've learned that I know even less than I thought I knew! [this text denotes 'grin']