Firstly, setting a User ID in the client configuration is required to establish a connection to PubNub. If you don't provide a valid User ID (String up to 64 characters), you won't be able to use PubNub.
Secondly, User IDs are used to identify a client, which might be an end user, a device, or a server. A single user (a real living person) might have multiple devices (phone, tablet, laptop) so it's important to understand the relationship between them. Moreover, features which determine user's online presence rely on User IDs.
Finally, User IDs are essential to correctly calculate your bill according to the Monthly Active User (MAU) pricing model, which is based on the number of unique users that connect to PubNub at least once in a calendar month.
With your account created and SDK configured, it's time to start sending messages.