According to a quick search it appears that your notion about it being protein-based is correct. Most of the recipes I've seen say to skim it; the above-linked site says that adding a little oil will keep the foam down.
I personally wouldn't do anything with it as an ingredient unless I had a truly massive amount of it to experiment with--I don't know enough about the properties to make anything other than wild guesses about how it would work. The only similar material I can think of would be beaten egg whites, but unless you were desperate for a vegan alternative and were already boiling up vats full of chickpeas I'd just use the eggwhites.
The answer depends on where you live, and what type you have brought.
In many countries that import chickpeas they heat treat them to kill seed-borne diseases and insects. The heat treatment process makes them more difficult to cook, and soaking times double or triple.
Beans from exporters with phytosanitary certificates can be imported without heat treatment; these are the ones you want to get.
I don't think you can tell which is which by looking at them. At the moment we have some particularly dark, dry, and dead looking beans that soak up beautifully in 8 hours!
Soak non-heat treated beans for 8 to 12 hours, heat treated beans for 24 to 36 hours. Some overly heat treated beans will never fully revive, and you are best to return these to the shop as "faulty".
Soak and cook without salt, unless you are going to mash them. They fall apart more readily if salted.
If you are not mashing them, the secret to great chickpea taste is after soaking and cooking in water, is to lightly fry them with a little olive oil until dark spot appear, keep them or the pan moving so none burn. Then add the sauce, or add them to whatever dish you are preparing.
Best Answer
The white foam is a 'scum' that is formed as protein is released from the chickpeas. Yes, that is the term that is used. Scum.
This can be skimmed for aesthetic reasons - it sticks to the pot, or overboils, etc...
You are absolutely right, though, that if the chickpeas are rinsed after, then this is washed away.
If you are draining and pureeing, it will just incorporate into the dish.
Totally an aesthetic choice in my experience.
Similar to meat protein scum, referenced (What is this in the beef stew?)