why can Arduino variables of int type contain a value such as A2
You are correct. A2 is just a number (like everything in a microcontroller). We can look at the corresponding part in pins_arduino.h (a file defined in the variants folder of your used core and of your used board, for me: ~/arduino-1.8.9/hardware/arduino/avr/variants/standard/pins_arduino.h):
#define PIN_A0   (14)
#define PIN_A1   (15)
#define PIN_A2   (16)
#define PIN_A3   (17)
#define PIN_A4   (18)
#define PIN_A5   (19)
#define PIN_A6   (20)
#define PIN_A7   (21)

static const uint8_t A0 = PIN_A0;
static const uint8_t A1 = PIN_A1;
static const uint8_t A2 = PIN_A2;
static const uint8_t A3 = PIN_A3;
static const uint8_t A4 = PIN_A4;
static const uint8_t A5 = PIN_A5;
static const uint8_t A6 = PIN_A6;
static const uint8_t A7 = PIN_A7;

So here the core first defines the macro PIN_A2 as 16 (which is the pin number of that pin) and then it declares a static constant A2 with PIN_A2. So A2 is just the pin number of that pin, 16 in this case.
This is done to make the code more readable. The analog pins are marked with A0 to A7, so it is good to also be able to refer to that with these names. If you wanted, you could also use the pin number directly. But that wouldn't be as easy to read.