The 8255 is a PPI, the 8042 isn't, and neither is the 8288 a PPI but it is a Bus Controller which decodes the native 8088 CPU control bus signals into separate usable bus control signals to have signals for reading and writing memory and IO ports, used by all the peripherals, chips and the ISA bus slots.
The 8255 is just a parallel interface chip that sits on the 8088 CPU bus and has parallel IO ports. It contains some extra features but these are not used on a PC and XT. The CPU can just read the input ports and write the output ports, to achieve various things, and it is used for a lot of various things on a PC and XT.
Port A of 8255 is used for reading keyboard scan code, but it is received from keyboard by separate logic block, a shift register, and the readout happens in parallel.
Port B of 8255 is used for output to control various stuff, most common people know is controlling the PC speaker.
Port C is used as status input, such as for reading motherboard DIP switches.
The 8255 PPI lives in 8088 IO addresses 60h to 63h.
The 8042 is also "just" chip that sits on the 80286 CPU bus on a PC AT. It also has inputs and outputs, but it is a microcontroller, a CPU that executes software code stored inside it. The main function is that it sort of partly replaces the 8255 PPI and external logic which receives keyboard data, which is why it is commonly dubbed as the 8042 keyboard controller The implementation is such that it emulates the 8255 PPI enough that software using the PC and XT hardware directly for keyboard input will also work on an AT with the 8042.
In reality the 8042 implements a bi-directional keyboard interface with the bi-directional AT keyboard. The AT keyboard accepts commands from PC to control the Caps/Scroll/Num Lock lights and also to set typematic rate and delay.
What's not immediately visible to the user is that the XT and AT keyboard protocols are incompatible and they even communicate using different scan code sets, so the 8042 also converts the AT scancodes to match the XT scancodes for compatibility, so all software that expects the original XT scan codes will work. The 8042 can be set to turn off the scancode translation.
Because the 8042 keyboard controller only lives in 80286 CPU addresses 60h and 64h, the other functionality of ports 61h to 63h are replicated in system chipset.