Allergic reactions are as a result of a rejection of something by the immune system. People can have allergy to dust, smoke etc.
In the case of protein allergy, when one egests a protein, it is broken down to increasingly smaller particles. Some of this microscopic protein molecules can trigger and immune reaction form the host. The result of this would be development of an allergy to that and any similar protein molecules. Since the immune system has ‘memory’, the next time it encounters that molecule the reaction is even faster and stronger.