why do amino acids change their structure in different pH
An amino acid has a basic amine group and an acidic carboxylic acid group. This structure internally transfers a hydrogen ion from COOH group to amine group leaving positive and negative charges on both. Such a structure is called a zwitterion.
When the pH is altered the zwitterion being charged can pick up hydrogen ions from the solution and thus their structure is altered. Hence due to change in pH the structure of the amino acids changes.