So the reason for this is because:
customer attribute code can have prefix "customer_" and its length must be max length minus prefix length
Now the code for the limit can be found at
app/code/core/Enterprise/Customer/Block/Adminhtml/Customer/Attribute/Edit/Tab/Main.php where it uses the constant
So it appears that normally a EAV attribute has a limit of 30 characts, so product and customer. As to why this limit is in place I am sorry but I dont know. The table seems to allow 255, maybe someone else can tell you why.
There are some thoughts behind this limit here