Expandable memory of devices Mobile phones or tablets come with limits like it has expandable memory of 32, 64, etc GB. I was wondering how this is determined? Does it mean that higher capacity sd cards won't work or this limitation is due to performance reasons? Please explain
Our phones/tablets comes with 2 types of memory: 

Internal memory(can't be expanded)

External memory(that is expandable)

If a certain manufacturer says that your handset comes with an expandable memory of 32 GB, means you can insert a 32 GB SD card in it.Now , if your device has 8 GB internal memory,that overall you get 32+8 GB space. 

Coming to the second part of your question, if you insert a 64 GB SD card in a handset mentioned above in answer, it wont support it.There is a limit to the amount of memory a particular phone can handle. SD cards come in a variety of flavors. And if your device isn't able to handle a particular flavor of storage technology, it won't accept higher capacity cards. 

There are different SD card flavors as in :

SDHC(Secure Digital High Capacity), Cards using this technology can hold between 4GB and 32GB of data.

SDXC(Secure Digital Extended Capacity), which can hold between 64GB and 2TB of data.

You can learn more about these flavors here