Tickets get checked once in a while, usually by people with nondescript clothes waiting for passengers exiting the platforms or getting into the carriage and revealing themselves as ticket inspectors once the doors close and the train is on the move. Happened to me once or twice when working in Berlin and commuting by public transport for 6+ months a few years ago so I can vouch that it does happen but it does not seem that common either.
It's true that it's a strategy (random check and deterrence) closer to what you typically find in middle-sized towns with only a bus network than to what you see in large cities like London or Paris. But then again, Berlin is no London.
Also, all students in Berlin get a “Semesterticket” allowing unlimited travel on the Berlin transit network. It's not free but included in their registration fee, which is a rather heavy-handed but very effective approach: A major group of potential fare evaders simply have no choice but to pay for a rail card, whether they want it or not, thus obviating the need to spend resources on enforcement, at least for that demographic.
The machines you described are date/time validators for “open” tickets. You ‘punch’ or ‘validate’ the ticket (it's called entwerten in German) when you first use it and it remains valid for two hours/one day/a few days after the date/time printed by the machine. Using this mechanism, you can therefore purchase several day tickets at once, and use them one-by-one whenever you want.
If you look at a validated ticket, you will also notice the name of the station, which is especially useful for Kurzstrecken-tickets, which are valid for up to three stations on the U-Bahn or S-Bahn or to verify you haven't done a round-trip (which is not allowed on a single-trip ticket).
Do beware, day tickets need to be validated. Since you don't have to use them on the day you bought them, they aren't valid if you don't ‘punch’ them with the machine when you do want to use them. If you are tourist and buy them from a counter, maybe the clerk would warn you about it but IIRC ticket machines always give you an “open” day ticket (except the machines placed in trams).
The penalty if you are found without a valid ticket is a €60 fine.