In social anthropology we often explain this with the concept of power relations and social discourses. A discourse is simply a collection of ideas about how something should be like that is collectively seen as a dominant point of view. For example many European countries are atheist and reject the notion of religion. There is no rational or logical reason why this is; it is simply so because we as a social collective decide it is so and we uphold these notions because we see it as desireable by valuing atheism over religion and teaching our children that religious views are undesirable.
When looking at ethnic groups, it tends to be in the shape of racial hierarchies with the discourses controlling where you fall in the hierarchy and how you need to be/act in order to be like "your race". There are cultural stereotypes that prevail how one should be like and there is power to be gained as well as submission in relation to how individuals decide to follow or go against the dominant discourse. So we for example have this stereotype that black men are all gangsters. What this means in a power sense is that we degrade all black men into a stereotype. This is how the power relation between white and black people is maintained. So your friends probably make comments like "I act white", they do so because they are inherently aware of these discourses that frame their being due to their skin color and ethnic origin and they submit to the idea that they are in fact subordinate "white culture" where people do not act like gangsters.
In post-colonial studies, a major part of the post-colonial mindset is how power relations are created between black and white people by defining black people as "savages" because black people are not seem to be the hegemonic group. It is exactly this kind of logic that is carried over here, where a projected view that black people are lazy, unable to control themselves both physically and sexually and so on onto modern-day blacks. The prevailing mindset is that a black person will thus never socially be as valued as a white person because our subconscious is so ingrained with the idea of this power relation that blacks should inherently not be trusted. They are dangerous because they are not civilized as white people are, they are savages. So if a black person says, "I did such a white thing today", they basically sadly submit to the idea that they are savages, that their way of being is of less value and it is not in their inherent nature to be "white". This was simply an exception of the rule, they were pretending.
So now that I've painted this very negative image of how the Western society as a whole tends to view race, I also want to stress that there is power to be gained and that power relations can be reversed. When a black person thus says, "I'm such a gangsta nigga", they are doing just that. They are creating value in in the stereotype, making it seen as something desireable to be and thus the power relations become reverse. I think this is very well exemplified in the black hip-hop scene and how white artists ironically tend to struggle simply because they are white. They lack that certain something blacks have which makes their music more authentic compared to the white man's.
Of course, as a whole, the hip-hop scene is still subordinate white culture and I'm uncertain about the values to be found within extreme black culture to be something we should eventually see as something desireable in children, especially when it comes to mascuilnity ideals. Anyway, I think that's a discussion I leave for another time as that is equally complicated. But at least I think you get an idea why your friends might say those things that they say and why.
/end of anthropology vomit
TLDR!!
Actually, it was quite spot on. From a personal standpoint, I always loathed comments like, "You act white", especially when given as some sort of compliment. It was, as you allude, in fact a great insult cloaked in the idea that said commentator is separating me from my culture because they view me as distanced from it. My reason for my manner of speech etc has always been the following idea: I speak one language; despite whatever subjugation of my ancestors went into speaking this language, it is no less the language I speak today--as such I see no reason not to attempt to master it. I think prior to civil rights etc, a lot of these people would have taken such as a compliment; I mean, some blacks with more admixture would attempt to literally pass for "white"--white being "purely" white as governed by the one-drop rule. However, today, it seems that people are less likely to say, "I am a white black man" rather than "I am an intelligent black man". While you could argue that the latter is still admitting some subjugation and admittance to stereotype, it is a far cry from "I act white".
Furthermore, Hip-Hop to me is the ultimate trolling using re-appropriation; it has taken common aspersions such as "nigga" and behaviors and made it something quite lauded, desirous (at least on the surface), and ultimately profitable. Some of these artists, if not for their skin color and features, seem to be almost in black face--doing everything and anything to amplify their perceived physical prowess. But is it admitting subjugation? Somewhat, as with any other culturally re-appropriated idea or measure, but it is done because it is in jest and lucrative. To some extent, people desire to be as powerful, in the moment, and headstrong as these people portray. I don't think it's purely coveted by whites. I think we're moving into an ideal that involves more cultural integration, but again, we could go into this in great lengths.
I do have a bias. I favor the western model of liberal democratic capitalism and I do not regret that western countries triumphed over other societies, which would not have developed beyond their existing "modes of production".
The question still remains, if we believe your answer, why did European societies produce a surplus, leading to the development of towns and early industry (prior to industrial revolution), necessitating more resources, while "primitive" societies did not.
I really have no problem admitting the engineering/scientific/governmental deficit of those conquered by European nations as it logically follows that in order for such to happen, one power had to be greater than the other. However, I hope, on a personal level with you that you do not (if you're American or from another ethnically diverse diaspora) take these antiquated relics of history into your judgement of the subjugated (blacks/hispanics/asians) etc. The reason I say this is not because you cannot salvage statistics to speak of the whole but rather because it diverges greatly with certain (a great deal, actually) individuals.