Sampling Theory in Signal Processing In signal processing, when you sampling an analog signal, 
the sampling theory says that the sampling frequency needs to be at least twice the maximum frequency in the analog signal content.

I understand that if the sampling frequency is smaller, then it can cause
a data loss, but what if the sampling frequency will be exactly as the maximum frequency
of the analog signal? Why should it be twice as great as the maximum frequency of the 
analog signal? 

How can I know what the maximum frequency of the analog signal is?
Incorrect initial statement.  The sampling rate must be greater-than (not just at-least or equal-to) twice the highest frequency present in a band-limited base-band signal, for aliasing (and thus potential information mixing/corruption/ loss) not to occur.

The maximum frequency present is usually by design, by putting a (estimated  or assumed to be sufficient) low-pass filter before the sampling mechanism.  (Or the mechanism of the signal or sampler itself includes such a low-pass frequency response.)